mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-199f9b66c0a2b2e4/out/
avssuas.rs

1#![doc = "MAVLink AVSSUAS dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#[cfg(feature = "arbitrary")]
5use arbitrary::Arbitrary;
6#[allow(unused_imports)]
7use bitflags::bitflags;
8use mavlink_core::{bytes::Bytes, bytes_mut::BytesMut, MavlinkVersion, Message, MessageData};
9#[allow(unused_imports)]
10use num_derive::FromPrimitive;
11#[allow(unused_imports)]
12use num_derive::ToPrimitive;
13#[allow(unused_imports)]
14use num_traits::FromPrimitive;
15#[allow(unused_imports)]
16use num_traits::ToPrimitive;
17#[cfg(feature = "serde")]
18use serde::{Deserialize, Serialize};
19#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
20#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21#[cfg_attr(feature = "serde", serde(tag = "type"))]
22#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23#[repr(u32)]
24#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
25pub enum SpeedType {
26    #[doc = "Airspeed"]
27    SPEED_TYPE_AIRSPEED = 0,
28    #[doc = "Groundspeed"]
29    SPEED_TYPE_GROUNDSPEED = 1,
30    #[doc = "Climb speed"]
31    SPEED_TYPE_CLIMB_SPEED = 2,
32    #[doc = "Descent speed"]
33    SPEED_TYPE_DESCENT_SPEED = 3,
34}
35impl SpeedType {
36    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
37}
38impl Default for SpeedType {
39    fn default() -> Self {
40        Self::DEFAULT
41    }
42}
43bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
44impl HilActuatorControlsFlags {
45    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
46}
47impl Default for HilActuatorControlsFlags {
48    fn default() -> Self {
49        Self::DEFAULT
50    }
51}
52#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
53#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
54#[cfg_attr(feature = "serde", serde(tag = "type"))]
55#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
56#[repr(u32)]
57#[doc = "Aircraft-rated danger from this threat."]
58pub enum MavCollisionThreatLevel {
59    #[doc = "Not a threat"]
60    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
61    #[doc = "Craft is mildly concerned about this threat"]
62    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
63    #[doc = "Craft is panicking, and may take actions to avoid threat"]
64    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
65}
66impl MavCollisionThreatLevel {
67    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
68}
69impl Default for MavCollisionThreatLevel {
70    fn default() -> Self {
71        Self::DEFAULT
72    }
73}
74#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
75#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
76#[cfg_attr(feature = "serde", serde(tag = "type"))]
77#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
78#[repr(u32)]
79#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
80pub enum SetFocusType {
81    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
82    FOCUS_TYPE_STEP = 0,
83    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
84    FOCUS_TYPE_CONTINUOUS = 1,
85    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
86    FOCUS_TYPE_RANGE = 2,
87    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
88    FOCUS_TYPE_METERS = 3,
89    #[doc = "Focus automatically."]
90    FOCUS_TYPE_AUTO = 4,
91    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
92    FOCUS_TYPE_AUTO_SINGLE = 5,
93    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
94    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
95}
96impl SetFocusType {
97    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
98}
99impl Default for SetFocusType {
100    fn default() -> Self {
101        Self::DEFAULT
102    }
103}
104#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
105#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
106#[cfg_attr(feature = "serde", serde(tag = "type"))]
107#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
108#[repr(u32)]
109#[doc = "List of possible units where failures can be injected."]
110pub enum FailureUnit {
111    FAILURE_UNIT_SENSOR_GYRO = 0,
112    FAILURE_UNIT_SENSOR_ACCEL = 1,
113    FAILURE_UNIT_SENSOR_MAG = 2,
114    FAILURE_UNIT_SENSOR_BARO = 3,
115    FAILURE_UNIT_SENSOR_GPS = 4,
116    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
117    FAILURE_UNIT_SENSOR_VIO = 6,
118    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
119    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
120    FAILURE_UNIT_SYSTEM_BATTERY = 100,
121    FAILURE_UNIT_SYSTEM_MOTOR = 101,
122    FAILURE_UNIT_SYSTEM_SERVO = 102,
123    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
124    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
125    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
126}
127impl FailureUnit {
128    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
129}
130impl Default for FailureUnit {
131    fn default() -> Self {
132        Self::DEFAULT
133    }
134}
135#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
136#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
137#[cfg_attr(feature = "serde", serde(tag = "type"))]
138#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
139#[repr(u32)]
140pub enum MavOdidOperatorIdType {
141    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
142    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
143}
144impl MavOdidOperatorIdType {
145    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
146}
147impl Default for MavOdidOperatorIdType {
148    fn default() -> Self {
149        Self::DEFAULT
150    }
151}
152#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
153#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
154#[cfg_attr(feature = "serde", serde(tag = "type"))]
155#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
156#[repr(u32)]
157pub enum MavOdidOperatorLocationType {
158    #[doc = "The location/altitude of the operator is the same as the take-off location."]
159    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
160    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
161    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
162    #[doc = "The location/altitude of the operator are fixed values."]
163    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
164}
165impl MavOdidOperatorLocationType {
166    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
167}
168impl Default for MavOdidOperatorLocationType {
169    fn default() -> Self {
170        Self::DEFAULT
171    }
172}
173bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
174impl UtmDataAvailFlags {
175    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
176}
177impl Default for UtmDataAvailFlags {
178    fn default() -> Self {
179        Self::DEFAULT
180    }
181}
182#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
183#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
184#[cfg_attr(feature = "serde", serde(tag = "type"))]
185#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
186#[repr(u32)]
187#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
188pub enum PreflightStorageParameterAction {
189    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
190    PARAM_READ_PERSISTENT = 0,
191    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
192    PARAM_WRITE_PERSISTENT = 1,
193    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
194    PARAM_RESET_CONFIG_DEFAULT = 2,
195    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
196    PARAM_RESET_SENSOR_DEFAULT = 3,
197    #[doc = "Reset all parameters, including operation counters, to default values"]
198    PARAM_RESET_ALL_DEFAULT = 4,
199}
200impl PreflightStorageParameterAction {
201    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
202}
203impl Default for PreflightStorageParameterAction {
204    fn default() -> Self {
205        Self::DEFAULT
206    }
207}
208#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
209#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
210#[cfg_attr(feature = "serde", serde(tag = "type"))]
211#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
212#[repr(u32)]
213pub enum NavVtolLandOptions {
214    #[doc = "Default autopilot landing behaviour."]
215    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
216    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
217    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
218    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
219    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
220}
221impl NavVtolLandOptions {
222    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
223}
224impl Default for NavVtolLandOptions {
225    fn default() -> Self {
226        Self::DEFAULT
227    }
228}
229#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
230#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
231#[cfg_attr(feature = "serde", serde(tag = "type"))]
232#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
233#[repr(u32)]
234pub enum AvssM300OperationMode {
235    #[doc = "In manual control mode"]
236    MODE_M300_MANUAL_CTRL = 0,
237    #[doc = "In attitude mode"]
238    MODE_M300_ATTITUDE = 1,
239    #[doc = "In GPS mode"]
240    MODE_M300_P_GPS = 6,
241    #[doc = "In hotpoint mode"]
242    MODE_M300_HOTPOINT_MODE = 9,
243    #[doc = "In assisted takeoff mode"]
244    MODE_M300_ASSISTED_TAKEOFF = 10,
245    #[doc = "In auto takeoff mode"]
246    MODE_M300_AUTO_TAKEOFF = 11,
247    #[doc = "In auto landing mode"]
248    MODE_M300_AUTO_LANDING = 12,
249    #[doc = "In go home mode"]
250    MODE_M300_NAVI_GO_HOME = 15,
251    #[doc = "In sdk control mode"]
252    MODE_M300_NAVI_SDK_CTRL = 17,
253    #[doc = "In sport mode"]
254    MODE_M300_S_SPORT = 31,
255    #[doc = "In force auto landing mode"]
256    MODE_M300_FORCE_AUTO_LANDING = 33,
257    #[doc = "In tripod mode"]
258    MODE_M300_T_TRIPOD = 38,
259    #[doc = "In search mode"]
260    MODE_M300_SEARCH_MODE = 40,
261    #[doc = "In engine mode"]
262    MODE_M300_ENGINE_START = 41,
263}
264impl AvssM300OperationMode {
265    pub const DEFAULT: Self = Self::MODE_M300_MANUAL_CTRL;
266}
267impl Default for AvssM300OperationMode {
268    fn default() -> Self {
269        Self::DEFAULT
270    }
271}
272#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
273#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
274#[cfg_attr(feature = "serde", serde(tag = "type"))]
275#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
276#[repr(u32)]
277#[doc = "Possible safety switch states."]
278pub enum SafetySwitchState {
279    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
280    SAFETY_SWITCH_STATE_SAFE = 0,
281    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
282    SAFETY_SWITCH_STATE_DANGEROUS = 1,
283}
284impl SafetySwitchState {
285    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
286}
287impl Default for SafetySwitchState {
288    fn default() -> Self {
289        Self::DEFAULT
290    }
291}
292#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
293#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
294#[cfg_attr(feature = "serde", serde(tag = "type"))]
295#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
296#[repr(u32)]
297#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
298pub enum MavDataStream {
299    #[doc = "Enable all data streams"]
300    MAV_DATA_STREAM_ALL = 0,
301    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
302    MAV_DATA_STREAM_RAW_SENSORS = 1,
303    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
304    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
305    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
306    MAV_DATA_STREAM_RC_CHANNELS = 3,
307    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
308    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
309    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
310    MAV_DATA_STREAM_POSITION = 6,
311    #[doc = "Dependent on the autopilot"]
312    MAV_DATA_STREAM_EXTRA1 = 10,
313    #[doc = "Dependent on the autopilot"]
314    MAV_DATA_STREAM_EXTRA2 = 11,
315    #[doc = "Dependent on the autopilot"]
316    MAV_DATA_STREAM_EXTRA3 = 12,
317}
318impl MavDataStream {
319    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
320}
321impl Default for MavDataStream {
322    fn default() -> Self {
323        Self::DEFAULT
324    }
325}
326#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
327#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
328#[cfg_attr(feature = "serde", serde(tag = "type"))]
329#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
330#[repr(u32)]
331#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
332pub enum CompMetadataType {
333    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
334    COMP_METADATA_TYPE_GENERAL = 0,
335    #[doc = "Parameter meta data."]
336    COMP_METADATA_TYPE_PARAMETER = 1,
337    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
338    COMP_METADATA_TYPE_COMMANDS = 2,
339    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
340    COMP_METADATA_TYPE_PERIPHERALS = 3,
341    #[doc = "Meta data for the events interface."]
342    COMP_METADATA_TYPE_EVENTS = 4,
343    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
344    COMP_METADATA_TYPE_ACTUATORS = 5,
345}
346impl CompMetadataType {
347    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
348}
349impl Default for CompMetadataType {
350    fn default() -> Self {
351        Self::DEFAULT
352    }
353}
354#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
355#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
356#[cfg_attr(feature = "serde", serde(tag = "type"))]
357#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
358#[repr(u32)]
359#[doc = "Flags to indicate the status of camera storage."]
360pub enum StorageStatus {
361    #[doc = "Storage is missing (no microSD card loaded for example.)"]
362    STORAGE_STATUS_EMPTY = 0,
363    #[doc = "Storage present but unformatted."]
364    STORAGE_STATUS_UNFORMATTED = 1,
365    #[doc = "Storage present and ready."]
366    STORAGE_STATUS_READY = 2,
367    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
368    STORAGE_STATUS_NOT_SUPPORTED = 3,
369}
370impl StorageStatus {
371    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
372}
373impl Default for StorageStatus {
374    fn default() -> Self {
375        Self::DEFAULT
376    }
377}
378#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
379#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
380#[cfg_attr(feature = "serde", serde(tag = "type"))]
381#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
382#[repr(u32)]
383#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
384pub enum MavEventCurrentSequenceFlags {
385    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
386    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
387}
388impl MavEventCurrentSequenceFlags {
389    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
390}
391impl Default for MavEventCurrentSequenceFlags {
392    fn default() -> Self {
393        Self::DEFAULT
394    }
395}
396bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
397impl AttitudeTargetTypemask {
398    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
399}
400impl Default for AttitudeTargetTypemask {
401    fn default() -> Self {
402        Self::DEFAULT
403    }
404}
405#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
406#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
407#[cfg_attr(feature = "serde", serde(tag = "type"))]
408#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
409#[repr(u32)]
410#[doc = "Generalized UAVCAN node mode"]
411pub enum UavcanNodeMode {
412    #[doc = "The node is performing its primary functions."]
413    UAVCAN_NODE_MODE_OPERATIONAL = 0,
414    #[doc = "The node is initializing; this mode is entered immediately after startup."]
415    UAVCAN_NODE_MODE_INITIALIZATION = 1,
416    #[doc = "The node is under maintenance."]
417    UAVCAN_NODE_MODE_MAINTENANCE = 2,
418    #[doc = "The node is in the process of updating its software."]
419    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
420    #[doc = "The node is no longer available online."]
421    UAVCAN_NODE_MODE_OFFLINE = 7,
422}
423impl UavcanNodeMode {
424    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
425}
426impl Default for UavcanNodeMode {
427    fn default() -> Self {
428        Self::DEFAULT
429    }
430}
431#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
432#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
433#[cfg_attr(feature = "serde", serde(tag = "type"))]
434#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
435#[repr(u32)]
436pub enum MavAvssCommandFailureReason {
437    #[doc = "AVSS defined command failure reason. PRS not steady."]
438    PRS_NOT_STEADY = 1,
439    #[doc = "AVSS defined command failure reason. PRS DTM not armed."]
440    PRS_DTM_NOT_ARMED = 2,
441    #[doc = "AVSS defined command failure reason. PRS OTM not armed."]
442    PRS_OTM_NOT_ARMED = 3,
443}
444impl MavAvssCommandFailureReason {
445    pub const DEFAULT: Self = Self::PRS_NOT_STEADY;
446}
447impl Default for MavAvssCommandFailureReason {
448    fn default() -> Self {
449        Self::DEFAULT
450    }
451}
452#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
453#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
454#[cfg_attr(feature = "serde", serde(tag = "type"))]
455#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
456#[repr(u32)]
457pub enum CanFilterOp {
458    CAN_FILTER_REPLACE = 0,
459    CAN_FILTER_ADD = 1,
460    CAN_FILTER_REMOVE = 2,
461}
462impl CanFilterOp {
463    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
464}
465impl Default for CanFilterOp {
466    fn default() -> Self {
467        Self::DEFAULT
468    }
469}
470#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
471#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
472#[cfg_attr(feature = "serde", serde(tag = "type"))]
473#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
474#[repr(u32)]
475#[doc = "Enumeration of distance sensor types"]
476pub enum MavDistanceSensor {
477    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
478    MAV_DISTANCE_SENSOR_LASER = 0,
479    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
480    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
481    #[doc = "Infrared rangefinder, e.g. Sharp units"]
482    MAV_DISTANCE_SENSOR_INFRARED = 2,
483    #[doc = "Radar type, e.g. uLanding units"]
484    MAV_DISTANCE_SENSOR_RADAR = 3,
485    #[doc = "Broken or unknown type, e.g. analog units"]
486    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
487}
488impl MavDistanceSensor {
489    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
490}
491impl Default for MavDistanceSensor {
492    fn default() -> Self {
493        Self::DEFAULT
494    }
495}
496#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
497#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
498#[cfg_attr(feature = "serde", serde(tag = "type"))]
499#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
500#[repr(u32)]
501#[doc = "Specifies the datatype of a MAVLink extended parameter."]
502pub enum MavParamExtType {
503    #[doc = "8-bit unsigned integer"]
504    MAV_PARAM_EXT_TYPE_UINT8 = 1,
505    #[doc = "8-bit signed integer"]
506    MAV_PARAM_EXT_TYPE_INT8 = 2,
507    #[doc = "16-bit unsigned integer"]
508    MAV_PARAM_EXT_TYPE_UINT16 = 3,
509    #[doc = "16-bit signed integer"]
510    MAV_PARAM_EXT_TYPE_INT16 = 4,
511    #[doc = "32-bit unsigned integer"]
512    MAV_PARAM_EXT_TYPE_UINT32 = 5,
513    #[doc = "32-bit signed integer"]
514    MAV_PARAM_EXT_TYPE_INT32 = 6,
515    #[doc = "64-bit unsigned integer"]
516    MAV_PARAM_EXT_TYPE_UINT64 = 7,
517    #[doc = "64-bit signed integer"]
518    MAV_PARAM_EXT_TYPE_INT64 = 8,
519    #[doc = "32-bit floating-point"]
520    MAV_PARAM_EXT_TYPE_REAL32 = 9,
521    #[doc = "64-bit floating-point"]
522    MAV_PARAM_EXT_TYPE_REAL64 = 10,
523    #[doc = "Custom Type"]
524    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
525}
526impl MavParamExtType {
527    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
528}
529impl Default for MavParamExtType {
530    fn default() -> Self {
531        Self::DEFAULT
532    }
533}
534#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
535#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
536#[cfg_attr(feature = "serde", serde(tag = "type"))]
537#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
538#[repr(u32)]
539pub enum MavOdidIdType {
540    #[doc = "No type defined."]
541    MAV_ODID_ID_TYPE_NONE = 0,
542    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
543    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
544    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
545    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
546    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
547    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
548    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
549    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
550}
551impl MavOdidIdType {
552    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
553}
554impl Default for MavOdidIdType {
555    fn default() -> Self {
556        Self::DEFAULT
557    }
558}
559bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
560impl MavBatteryFault {
561    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
562}
563impl Default for MavBatteryFault {
564    fn default() -> Self {
565        Self::DEFAULT
566    }
567}
568#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
569#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
570#[cfg_attr(feature = "serde", serde(tag = "type"))]
571#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
572#[repr(u32)]
573pub enum AvssHorseflyOperationMode {
574    #[doc = "In manual control mode"]
575    MODE_HORSEFLY_MANUAL_CTRL = 0,
576    #[doc = "In auto takeoff mode"]
577    MODE_HORSEFLY_AUTO_TAKEOFF = 1,
578    #[doc = "In auto landing mode"]
579    MODE_HORSEFLY_AUTO_LANDING = 2,
580    #[doc = "In go home mode"]
581    MODE_HORSEFLY_NAVI_GO_HOME = 3,
582    #[doc = "In drop mode"]
583    MODE_HORSEFLY_DROP = 4,
584}
585impl AvssHorseflyOperationMode {
586    pub const DEFAULT: Self = Self::MODE_HORSEFLY_MANUAL_CTRL;
587}
588impl Default for AvssHorseflyOperationMode {
589    fn default() -> Self {
590        Self::DEFAULT
591    }
592}
593#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
594#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
595#[cfg_attr(feature = "serde", serde(tag = "type"))]
596#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
597#[repr(u32)]
598#[doc = "Direction of VTOL transition"]
599pub enum VtolTransitionHeading {
600    #[doc = "Respect the heading configuration of the vehicle."]
601    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
602    #[doc = "Use the heading pointing towards the next waypoint."]
603    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
604    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
605    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
606    #[doc = "Use the specified heading in parameter 4."]
607    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
608    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
609    VTOL_TRANSITION_HEADING_ANY = 4,
610}
611impl VtolTransitionHeading {
612    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
613}
614impl Default for VtolTransitionHeading {
615    fn default() -> Self {
616        Self::DEFAULT
617    }
618}
619#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
620#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
621#[cfg_attr(feature = "serde", serde(tag = "type"))]
622#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
623#[repr(u32)]
624#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
625pub enum MavDoRepositionFlags {
626    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
627    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
628}
629impl MavDoRepositionFlags {
630    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
631}
632impl Default for MavDoRepositionFlags {
633    fn default() -> Self {
634        Self::DEFAULT
635    }
636}
637bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
638impl MavPowerStatus {
639    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
640}
641impl Default for MavPowerStatus {
642    fn default() -> Self {
643        Self::DEFAULT
644    }
645}
646#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
647#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
648#[cfg_attr(feature = "serde", serde(tag = "type"))]
649#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
650#[repr(u32)]
651#[doc = "Flags to indicate the type of storage."]
652pub enum StorageType {
653    #[doc = "Storage type is not known."]
654    STORAGE_TYPE_UNKNOWN = 0,
655    #[doc = "Storage type is USB device."]
656    STORAGE_TYPE_USB_STICK = 1,
657    #[doc = "Storage type is SD card."]
658    STORAGE_TYPE_SD = 2,
659    #[doc = "Storage type is microSD card."]
660    STORAGE_TYPE_MICROSD = 3,
661    #[doc = "Storage type is CFast."]
662    STORAGE_TYPE_CF = 4,
663    #[doc = "Storage type is CFexpress."]
664    STORAGE_TYPE_CFE = 5,
665    #[doc = "Storage type is XQD."]
666    STORAGE_TYPE_XQD = 6,
667    #[doc = "Storage type is HD mass storage type."]
668    STORAGE_TYPE_HD = 7,
669    #[doc = "Storage type is other, not listed type."]
670    STORAGE_TYPE_OTHER = 254,
671}
672impl StorageType {
673    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
674}
675impl Default for StorageType {
676    fn default() -> Self {
677        Self::DEFAULT
678    }
679}
680#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
681#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
682#[cfg_attr(feature = "serde", serde(tag = "type"))]
683#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
684#[repr(u32)]
685#[doc = "Video stream types"]
686pub enum VideoStreamType {
687    #[doc = "Stream is RTSP"]
688    VIDEO_STREAM_TYPE_RTSP = 0,
689    #[doc = "Stream is RTP UDP (URI gives the port number)"]
690    VIDEO_STREAM_TYPE_RTPUDP = 1,
691    #[doc = "Stream is MPEG on TCP"]
692    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
693    #[doc = "Stream is MPEG TS (URI gives the port number)"]
694    VIDEO_STREAM_TYPE_MPEG_TS = 3,
695}
696impl VideoStreamType {
697    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
698}
699impl Default for VideoStreamType {
700    fn default() -> Self {
701        Self::DEFAULT
702    }
703}
704#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
705#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
706#[cfg_attr(feature = "serde", serde(tag = "type"))]
707#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
708#[repr(u32)]
709#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
710pub enum RtkBaselineCoordinateSystem {
711    #[doc = "Earth-centered, Earth-fixed"]
712    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
713    #[doc = "RTK basestation centered, north, east, down"]
714    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
715}
716impl RtkBaselineCoordinateSystem {
717    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
718}
719impl Default for RtkBaselineCoordinateSystem {
720    fn default() -> Self {
721        Self::DEFAULT
722    }
723}
724#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
725#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
726#[cfg_attr(feature = "serde", serde(tag = "type"))]
727#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
728#[repr(u32)]
729#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
730pub enum MavRoi {
731    #[doc = "No region of interest."]
732    MAV_ROI_NONE = 0,
733    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
734    MAV_ROI_WPNEXT = 1,
735    #[doc = "Point toward given waypoint."]
736    MAV_ROI_WPINDEX = 2,
737    #[doc = "Point toward fixed location."]
738    MAV_ROI_LOCATION = 3,
739    #[doc = "Point toward of given id."]
740    MAV_ROI_TARGET = 4,
741}
742impl MavRoi {
743    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
744}
745impl Default for MavRoi {
746    fn default() -> Self {
747        Self::DEFAULT
748    }
749}
750#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
751#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
752#[cfg_attr(feature = "serde", serde(tag = "type"))]
753#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
754#[repr(u32)]
755#[doc = "Winch actions."]
756pub enum WinchActions {
757    #[doc = "Allow motor to freewheel."]
758    WINCH_RELAXED = 0,
759    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
760    WINCH_RELATIVE_LENGTH_CONTROL = 1,
761    #[doc = "Wind or unwind line at specified rate."]
762    WINCH_RATE_CONTROL = 2,
763    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
764    WINCH_LOCK = 3,
765    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
766    WINCH_DELIVER = 4,
767    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
768    WINCH_HOLD = 5,
769    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
770    WINCH_RETRACT = 6,
771    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
772    WINCH_LOAD_LINE = 7,
773    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
774    WINCH_ABANDON_LINE = 8,
775    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
776    WINCH_LOAD_PAYLOAD = 9,
777}
778impl WinchActions {
779    pub const DEFAULT: Self = Self::WINCH_RELAXED;
780}
781impl Default for WinchActions {
782    fn default() -> Self {
783        Self::DEFAULT
784    }
785}
786#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
787#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
788#[cfg_attr(feature = "serde", serde(tag = "type"))]
789#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
790#[repr(u32)]
791#[doc = "Enumeration of the ADSB altimeter types"]
792pub enum AdsbAltitudeType {
793    #[doc = "Altitude reported from a Baro source using QNH reference"]
794    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
795    #[doc = "Altitude reported from a GNSS source"]
796    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
797}
798impl AdsbAltitudeType {
799    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
800}
801impl Default for AdsbAltitudeType {
802    fn default() -> Self {
803        Self::DEFAULT
804    }
805}
806#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
807#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
808#[cfg_attr(feature = "serde", serde(tag = "type"))]
809#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
810#[repr(u32)]
811#[doc = "Yaw behaviour during orbit flight."]
812pub enum OrbitYawBehaviour {
813    #[doc = "Vehicle front points to the center (default)."]
814    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
815    #[doc = "Vehicle front holds heading when message received."]
816    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
817    #[doc = "Yaw uncontrolled."]
818    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
819    #[doc = "Vehicle front follows flight path (tangential to circle)."]
820    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
821    #[doc = "Yaw controlled by RC input."]
822    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
823    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
824    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
825}
826impl OrbitYawBehaviour {
827    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
828}
829impl Default for OrbitYawBehaviour {
830    fn default() -> Self {
831        Self::DEFAULT
832    }
833}
834#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
835#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
836#[cfg_attr(feature = "serde", serde(tag = "type"))]
837#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
838#[repr(u32)]
839#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
840pub enum RebootShutdownConditions {
841    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
842    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
843    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
844    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
845}
846impl RebootShutdownConditions {
847    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
848}
849impl Default for RebootShutdownConditions {
850    fn default() -> Self {
851        Self::DEFAULT
852    }
853}
854#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
855#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
856#[cfg_attr(feature = "serde", serde(tag = "type"))]
857#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
858#[repr(u32)]
859pub enum MavOdidHeightRef {
860    #[doc = "The height field is relative to the take-off location."]
861    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
862    #[doc = "The height field is relative to ground."]
863    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
864}
865impl MavOdidHeightRef {
866    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
867}
868impl Default for MavOdidHeightRef {
869    fn default() -> Self {
870        Self::DEFAULT
871    }
872}
873#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
874#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
875#[cfg_attr(feature = "serde", serde(tag = "type"))]
876#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
877#[repr(u32)]
878#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
879pub enum FirmwareVersionType {
880    #[doc = "development release"]
881    FIRMWARE_VERSION_TYPE_DEV = 0,
882    #[doc = "alpha release"]
883    FIRMWARE_VERSION_TYPE_ALPHA = 64,
884    #[doc = "beta release"]
885    FIRMWARE_VERSION_TYPE_BETA = 128,
886    #[doc = "release candidate"]
887    FIRMWARE_VERSION_TYPE_RC = 192,
888    #[doc = "official stable release"]
889    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
890}
891impl FirmwareVersionType {
892    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
893}
894impl Default for FirmwareVersionType {
895    fn default() -> Self {
896        Self::DEFAULT
897    }
898}
899bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
900impl MavWinchStatusFlag {
901    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
902}
903impl Default for MavWinchStatusFlag {
904    fn default() -> Self {
905        Self::DEFAULT
906    }
907}
908bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
909impl PositionTargetTypemask {
910    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
911}
912impl Default for PositionTargetTypemask {
913    fn default() -> Self {
914        Self::DEFAULT
915    }
916}
917#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
918#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
919#[cfg_attr(feature = "serde", serde(tag = "type"))]
920#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
921#[repr(u32)]
922pub enum MavState {
923    #[doc = "Uninitialized system, state is unknown."]
924    MAV_STATE_UNINIT = 0,
925    #[doc = "System is booting up."]
926    MAV_STATE_BOOT = 1,
927    #[doc = "System is calibrating and not flight-ready."]
928    MAV_STATE_CALIBRATING = 2,
929    #[doc = "System is grounded and on standby. It can be launched any time."]
930    MAV_STATE_STANDBY = 3,
931    #[doc = "System is active and might be already airborne. Motors are engaged."]
932    MAV_STATE_ACTIVE = 4,
933    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
934    MAV_STATE_CRITICAL = 5,
935    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
936    MAV_STATE_EMERGENCY = 6,
937    #[doc = "System just initialized its power-down sequence, will shut down now."]
938    MAV_STATE_POWEROFF = 7,
939    #[doc = "System is terminating itself (failsafe or commanded)."]
940    MAV_STATE_FLIGHT_TERMINATION = 8,
941}
942impl MavState {
943    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
944}
945impl Default for MavState {
946    fn default() -> Self {
947        Self::DEFAULT
948    }
949}
950#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
951#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
952#[cfg_attr(feature = "serde", serde(tag = "type"))]
953#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
954#[repr(u32)]
955#[doc = "SERIAL_CONTROL device types"]
956pub enum SerialControlDev {
957    #[doc = "First telemetry port"]
958    SERIAL_CONTROL_DEV_TELEM1 = 0,
959    #[doc = "Second telemetry port"]
960    SERIAL_CONTROL_DEV_TELEM2 = 1,
961    #[doc = "First GPS port"]
962    SERIAL_CONTROL_DEV_GPS1 = 2,
963    #[doc = "Second GPS port"]
964    SERIAL_CONTROL_DEV_GPS2 = 3,
965    #[doc = "system shell"]
966    SERIAL_CONTROL_DEV_SHELL = 10,
967    #[doc = "SERIAL0"]
968    SERIAL_CONTROL_SERIAL0 = 100,
969    #[doc = "SERIAL1"]
970    SERIAL_CONTROL_SERIAL1 = 101,
971    #[doc = "SERIAL2"]
972    SERIAL_CONTROL_SERIAL2 = 102,
973    #[doc = "SERIAL3"]
974    SERIAL_CONTROL_SERIAL3 = 103,
975    #[doc = "SERIAL4"]
976    SERIAL_CONTROL_SERIAL4 = 104,
977    #[doc = "SERIAL5"]
978    SERIAL_CONTROL_SERIAL5 = 105,
979    #[doc = "SERIAL6"]
980    SERIAL_CONTROL_SERIAL6 = 106,
981    #[doc = "SERIAL7"]
982    SERIAL_CONTROL_SERIAL7 = 107,
983    #[doc = "SERIAL8"]
984    SERIAL_CONTROL_SERIAL8 = 108,
985    #[doc = "SERIAL9"]
986    SERIAL_CONTROL_SERIAL9 = 109,
987}
988impl SerialControlDev {
989    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
990}
991impl Default for SerialControlDev {
992    fn default() -> Self {
993        Self::DEFAULT
994    }
995}
996#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
997#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
998#[cfg_attr(feature = "serde", serde(tag = "type"))]
999#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1000#[repr(u32)]
1001pub enum MavArmAuthDeniedReason {
1002    #[doc = "Not a specific reason"]
1003    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1004    #[doc = "Authorizer will send the error as string to GCS"]
1005    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1006    #[doc = "At least one waypoint have a invalid value"]
1007    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1008    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1009    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1010    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1011    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1012    #[doc = "Weather is not good to fly"]
1013    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1014}
1015impl MavArmAuthDeniedReason {
1016    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1017}
1018impl Default for MavArmAuthDeniedReason {
1019    fn default() -> Self {
1020        Self::DEFAULT
1021    }
1022}
1023bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
1024impl GimbalDeviceErrorFlags {
1025    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
1026}
1027impl Default for GimbalDeviceErrorFlags {
1028    fn default() -> Self {
1029        Self::DEFAULT
1030    }
1031}
1032#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1033#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1034#[cfg_attr(feature = "serde", serde(tag = "type"))]
1035#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1036#[repr(u32)]
1037pub enum MavOdidSpeedAcc {
1038    #[doc = "The speed accuracy is unknown."]
1039    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
1040    #[doc = "The speed accuracy is smaller than 10 meters per second."]
1041    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
1042    #[doc = "The speed accuracy is smaller than 3 meters per second."]
1043    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
1044    #[doc = "The speed accuracy is smaller than 1 meters per second."]
1045    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
1046    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
1047    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
1048}
1049impl MavOdidSpeedAcc {
1050    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
1051}
1052impl Default for MavOdidSpeedAcc {
1053    fn default() -> Self {
1054        Self::DEFAULT
1055    }
1056}
1057#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1058#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1059#[cfg_attr(feature = "serde", serde(tag = "type"))]
1060#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1061#[repr(u32)]
1062#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
1063pub enum ParachuteAction {
1064    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
1065    PARACHUTE_DISABLE = 0,
1066    #[doc = "Enable auto-release of parachute."]
1067    PARACHUTE_ENABLE = 1,
1068    #[doc = "Release parachute and kill motors."]
1069    PARACHUTE_RELEASE = 2,
1070}
1071impl ParachuteAction {
1072    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
1073}
1074impl Default for ParachuteAction {
1075    fn default() -> Self {
1076        Self::DEFAULT
1077    }
1078}
1079#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1080#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1081#[cfg_attr(feature = "serde", serde(tag = "type"))]
1082#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1083#[repr(u32)]
1084#[doc = "WiFi Mode."]
1085pub enum WifiConfigApMode {
1086    #[doc = "WiFi mode is undefined."]
1087    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
1088    #[doc = "WiFi configured as an access point."]
1089    WIFI_CONFIG_AP_MODE_AP = 1,
1090    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
1091    WIFI_CONFIG_AP_MODE_STATION = 2,
1092    #[doc = "WiFi disabled."]
1093    WIFI_CONFIG_AP_MODE_DISABLED = 3,
1094}
1095impl WifiConfigApMode {
1096    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
1097}
1098impl Default for WifiConfigApMode {
1099    fn default() -> Self {
1100        Self::DEFAULT
1101    }
1102}
1103#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1104#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1105#[cfg_attr(feature = "serde", serde(tag = "type"))]
1106#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1107#[repr(u32)]
1108#[doc = "Enumeration for battery charge states."]
1109pub enum MavBatteryChargeState {
1110    #[doc = "Low battery state is not provided"]
1111    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1112    #[doc = "Battery is not in low state. Normal operation."]
1113    MAV_BATTERY_CHARGE_STATE_OK = 1,
1114    #[doc = "Battery state is low, warn and monitor close."]
1115    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1116    #[doc = "Battery state is critical, return or abort immediately."]
1117    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1118    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1119    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1120    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1121    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1122    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1123    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1124    #[doc = "Battery is charging."]
1125    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1126}
1127impl MavBatteryChargeState {
1128    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1129}
1130impl Default for MavBatteryChargeState {
1131    fn default() -> Self {
1132        Self::DEFAULT
1133    }
1134}
1135#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1136#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1137#[cfg_attr(feature = "serde", serde(tag = "type"))]
1138#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1139#[repr(u32)]
1140#[doc = "Gripper actions."]
1141pub enum GripperActions {
1142    #[doc = "Gripper release cargo."]
1143    GRIPPER_ACTION_RELEASE = 0,
1144    #[doc = "Gripper grab onto cargo."]
1145    GRIPPER_ACTION_GRAB = 1,
1146}
1147impl GripperActions {
1148    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
1149}
1150impl Default for GripperActions {
1151    fn default() -> Self {
1152        Self::DEFAULT
1153    }
1154}
1155#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1156#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1157#[cfg_attr(feature = "serde", serde(tag = "type"))]
1158#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1159#[repr(u32)]
1160#[doc = "Enumeration of sensor orientation, according to its rotations"]
1161pub enum MavSensorOrientation {
1162    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
1163    MAV_SENSOR_ROTATION_NONE = 0,
1164    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
1165    MAV_SENSOR_ROTATION_YAW_45 = 1,
1166    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
1167    MAV_SENSOR_ROTATION_YAW_90 = 2,
1168    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
1169    MAV_SENSOR_ROTATION_YAW_135 = 3,
1170    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
1171    MAV_SENSOR_ROTATION_YAW_180 = 4,
1172    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
1173    MAV_SENSOR_ROTATION_YAW_225 = 5,
1174    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
1175    MAV_SENSOR_ROTATION_YAW_270 = 6,
1176    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
1177    MAV_SENSOR_ROTATION_YAW_315 = 7,
1178    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
1179    MAV_SENSOR_ROTATION_ROLL_180 = 8,
1180    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
1181    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
1182    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
1183    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
1184    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
1185    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
1186    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
1187    MAV_SENSOR_ROTATION_PITCH_180 = 12,
1188    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
1189    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
1190    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
1191    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
1192    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
1193    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
1194    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
1195    MAV_SENSOR_ROTATION_ROLL_90 = 16,
1196    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
1197    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
1198    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
1199    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
1200    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
1201    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
1202    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
1203    MAV_SENSOR_ROTATION_ROLL_270 = 20,
1204    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
1205    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
1206    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
1207    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
1208    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
1209    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
1210    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
1211    MAV_SENSOR_ROTATION_PITCH_90 = 24,
1212    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
1213    MAV_SENSOR_ROTATION_PITCH_270 = 25,
1214    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
1215    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
1216    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
1217    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
1218    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
1219    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
1220    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
1221    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
1222    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
1223    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
1224    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
1225    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
1226    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
1227    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
1228    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
1229    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
1230    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
1231    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
1232    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
1233    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
1234    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
1235    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
1236    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
1237    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
1238    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
1239    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
1240    #[doc = "Pitch: 315"]
1241    MAV_SENSOR_ROTATION_PITCH_315 = 39,
1242    #[doc = "Roll: 90, Pitch: 315"]
1243    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
1244    #[doc = "Custom orientation"]
1245    MAV_SENSOR_ROTATION_CUSTOM = 100,
1246}
1247impl MavSensorOrientation {
1248    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
1249}
1250impl Default for MavSensorOrientation {
1251    fn default() -> Self {
1252        Self::DEFAULT
1253    }
1254}
1255#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1256#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1257#[cfg_attr(feature = "serde", serde(tag = "type"))]
1258#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1259#[repr(u32)]
1260#[doc = "Generalized UAVCAN node health"]
1261pub enum UavcanNodeHealth {
1262    #[doc = "The node is functioning properly."]
1263    UAVCAN_NODE_HEALTH_OK = 0,
1264    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
1265    UAVCAN_NODE_HEALTH_WARNING = 1,
1266    #[doc = "The node has encountered a major failure."]
1267    UAVCAN_NODE_HEALTH_ERROR = 2,
1268    #[doc = "The node has suffered a fatal malfunction."]
1269    UAVCAN_NODE_HEALTH_CRITICAL = 3,
1270}
1271impl UavcanNodeHealth {
1272    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
1273}
1274impl Default for UavcanNodeHealth {
1275    fn default() -> Self {
1276        Self::DEFAULT
1277    }
1278}
1279#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1280#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1281#[cfg_attr(feature = "serde", serde(tag = "type"))]
1282#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1283#[repr(u32)]
1284pub enum MavOdidStatus {
1285    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
1286    MAV_ODID_STATUS_UNDECLARED = 0,
1287    #[doc = "The UA is on the ground."]
1288    MAV_ODID_STATUS_GROUND = 1,
1289    #[doc = "The UA is in the air."]
1290    MAV_ODID_STATUS_AIRBORNE = 2,
1291    #[doc = "The UA is having an emergency."]
1292    MAV_ODID_STATUS_EMERGENCY = 3,
1293    #[doc = "The remote ID system is failing or unreliable in some way."]
1294    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
1295}
1296impl MavOdidStatus {
1297    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
1298}
1299impl Default for MavOdidStatus {
1300    fn default() -> Self {
1301        Self::DEFAULT
1302    }
1303}
1304#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1305#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1306#[cfg_attr(feature = "serde", serde(tag = "type"))]
1307#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1308#[repr(u32)]
1309#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
1310pub enum PrecisionLandMode {
1311    #[doc = "Normal (non-precision) landing."]
1312    PRECISION_LAND_MODE_DISABLED = 0,
1313    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
1314    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
1315    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
1316    PRECISION_LAND_MODE_REQUIRED = 2,
1317}
1318impl PrecisionLandMode {
1319    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
1320}
1321impl Default for PrecisionLandMode {
1322    fn default() -> Self {
1323        Self::DEFAULT
1324    }
1325}
1326#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1327#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1328#[cfg_attr(feature = "serde", serde(tag = "type"))]
1329#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1330#[repr(u32)]
1331#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
1332pub enum AisNavStatus {
1333    #[doc = "Under way using engine."]
1334    UNDER_WAY = 0,
1335    AIS_NAV_ANCHORED = 1,
1336    AIS_NAV_UN_COMMANDED = 2,
1337    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
1338    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
1339    AIS_NAV_MOORED = 5,
1340    AIS_NAV_AGROUND = 6,
1341    AIS_NAV_FISHING = 7,
1342    AIS_NAV_SAILING = 8,
1343    AIS_NAV_RESERVED_HSC = 9,
1344    AIS_NAV_RESERVED_WIG = 10,
1345    AIS_NAV_RESERVED_1 = 11,
1346    AIS_NAV_RESERVED_2 = 12,
1347    AIS_NAV_RESERVED_3 = 13,
1348    #[doc = "Search And Rescue Transponder."]
1349    AIS_NAV_AIS_SART = 14,
1350    #[doc = "Not available (default)."]
1351    AIS_NAV_UNKNOWN = 15,
1352}
1353impl AisNavStatus {
1354    pub const DEFAULT: Self = Self::UNDER_WAY;
1355}
1356impl Default for AisNavStatus {
1357    fn default() -> Self {
1358        Self::DEFAULT
1359    }
1360}
1361#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1362#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1363#[cfg_attr(feature = "serde", serde(tag = "type"))]
1364#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1365#[repr(u32)]
1366pub enum MavOdidArmStatus {
1367    #[doc = "Passing arming checks."]
1368    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
1369    #[doc = "Generic arming failure, see error string for details."]
1370    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
1371}
1372impl MavOdidArmStatus {
1373    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
1374}
1375impl Default for MavOdidArmStatus {
1376    fn default() -> Self {
1377        Self::DEFAULT
1378    }
1379}
1380bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
1381impl MavGeneratorStatusFlag {
1382    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
1383}
1384impl Default for MavGeneratorStatusFlag {
1385    fn default() -> Self {
1386        Self::DEFAULT
1387    }
1388}
1389#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1390#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1391#[cfg_attr(feature = "serde", serde(tag = "type"))]
1392#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1393#[repr(u32)]
1394#[doc = "Video stream encodings"]
1395pub enum VideoStreamEncoding {
1396    #[doc = "Stream encoding is unknown"]
1397    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
1398    #[doc = "Stream encoding is H.264"]
1399    VIDEO_STREAM_ENCODING_H264 = 1,
1400    #[doc = "Stream encoding is H.265"]
1401    VIDEO_STREAM_ENCODING_H265 = 2,
1402}
1403impl VideoStreamEncoding {
1404    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
1405}
1406impl Default for VideoStreamEncoding {
1407    fn default() -> Self {
1408        Self::DEFAULT
1409    }
1410}
1411bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1412impl GpsInputIgnoreFlags {
1413    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1414}
1415impl Default for GpsInputIgnoreFlags {
1416    fn default() -> Self {
1417        Self::DEFAULT
1418    }
1419}
1420#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1421#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1422#[cfg_attr(feature = "serde", serde(tag = "type"))]
1423#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1424#[repr(u32)]
1425pub enum MavOdidCategoryEu {
1426    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
1427    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
1428    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
1429    MAV_ODID_CATEGORY_EU_OPEN = 1,
1430    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
1431    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
1432    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
1433    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
1434}
1435impl MavOdidCategoryEu {
1436    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
1437}
1438impl Default for MavOdidCategoryEu {
1439    fn default() -> Self {
1440        Self::DEFAULT
1441    }
1442}
1443#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1444#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1445#[cfg_attr(feature = "serde", serde(tag = "type"))]
1446#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1447#[repr(u32)]
1448#[doc = "Modes of illuminator"]
1449pub enum IlluminatorMode {
1450    #[doc = "Illuminator mode is not specified/unknown"]
1451    ILLUMINATOR_MODE_UNKNOWN = 0,
1452    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1453    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1454    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1455    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1456}
1457impl IlluminatorMode {
1458    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1459}
1460impl Default for IlluminatorMode {
1461    fn default() -> Self {
1462        Self::DEFAULT
1463    }
1464}
1465#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1466#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1467#[cfg_attr(feature = "serde", serde(tag = "type"))]
1468#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1469#[repr(u32)]
1470#[doc = "Reason for an event error response."]
1471pub enum MavEventErrorReason {
1472    #[doc = "The requested event is not available (anymore)."]
1473    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
1474}
1475impl MavEventErrorReason {
1476    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
1477}
1478impl Default for MavEventErrorReason {
1479    fn default() -> Self {
1480        Self::DEFAULT
1481    }
1482}
1483bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
1484impl SerialControlFlag {
1485    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
1486}
1487impl Default for SerialControlFlag {
1488    fn default() -> Self {
1489        Self::DEFAULT
1490    }
1491}
1492#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1493#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1494#[cfg_attr(feature = "serde", serde(tag = "type"))]
1495#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1496#[repr(u32)]
1497#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
1498pub enum ActuatorOutputFunction {
1499    #[doc = "No function (disabled)."]
1500    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
1501    #[doc = "Motor 1"]
1502    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
1503    #[doc = "Motor 2"]
1504    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
1505    #[doc = "Motor 3"]
1506    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
1507    #[doc = "Motor 4"]
1508    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
1509    #[doc = "Motor 5"]
1510    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
1511    #[doc = "Motor 6"]
1512    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
1513    #[doc = "Motor 7"]
1514    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
1515    #[doc = "Motor 8"]
1516    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
1517    #[doc = "Motor 9"]
1518    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
1519    #[doc = "Motor 10"]
1520    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
1521    #[doc = "Motor 11"]
1522    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
1523    #[doc = "Motor 12"]
1524    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
1525    #[doc = "Motor 13"]
1526    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
1527    #[doc = "Motor 14"]
1528    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
1529    #[doc = "Motor 15"]
1530    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
1531    #[doc = "Motor 16"]
1532    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
1533    #[doc = "Servo 1"]
1534    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
1535    #[doc = "Servo 2"]
1536    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
1537    #[doc = "Servo 3"]
1538    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
1539    #[doc = "Servo 4"]
1540    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
1541    #[doc = "Servo 5"]
1542    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
1543    #[doc = "Servo 6"]
1544    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
1545    #[doc = "Servo 7"]
1546    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
1547    #[doc = "Servo 8"]
1548    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
1549    #[doc = "Servo 9"]
1550    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
1551    #[doc = "Servo 10"]
1552    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
1553    #[doc = "Servo 11"]
1554    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
1555    #[doc = "Servo 12"]
1556    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
1557    #[doc = "Servo 13"]
1558    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
1559    #[doc = "Servo 14"]
1560    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
1561    #[doc = "Servo 15"]
1562    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
1563    #[doc = "Servo 16"]
1564    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
1565}
1566impl ActuatorOutputFunction {
1567    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
1568}
1569impl Default for ActuatorOutputFunction {
1570    fn default() -> Self {
1571        Self::DEFAULT
1572    }
1573}
1574#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1575#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1576#[cfg_attr(feature = "serde", serde(tag = "type"))]
1577#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1578#[repr(u32)]
1579#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
1580pub enum FenceType {
1581    #[doc = "Maximum altitude fence"]
1582    FENCE_TYPE_ALT_MAX = 1,
1583    #[doc = "Circle fence"]
1584    FENCE_TYPE_CIRCLE = 2,
1585    #[doc = "Polygon fence"]
1586    FENCE_TYPE_POLYGON = 4,
1587    #[doc = "Minimum altitude fence"]
1588    FENCE_TYPE_ALT_MIN = 8,
1589}
1590impl FenceType {
1591    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
1592}
1593impl Default for FenceType {
1594    fn default() -> Self {
1595        Self::DEFAULT
1596    }
1597}
1598bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
1599impl VideoStreamStatusFlags {
1600    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
1601}
1602impl Default for VideoStreamStatusFlags {
1603    fn default() -> Self {
1604        Self::DEFAULT
1605    }
1606}
1607bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
1608impl MavSysStatusSensorExtended {
1609    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
1610}
1611impl Default for MavSysStatusSensorExtended {
1612    fn default() -> Self {
1613        Self::DEFAULT
1614    }
1615}
1616#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1617#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1618#[cfg_attr(feature = "serde", serde(tag = "type"))]
1619#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1620#[repr(u32)]
1621#[doc = "Enumeration of estimator types"]
1622pub enum MavEstimatorType {
1623    #[doc = "Unknown type of the estimator."]
1624    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
1625    #[doc = "This is a naive estimator without any real covariance feedback."]
1626    MAV_ESTIMATOR_TYPE_NAIVE = 1,
1627    #[doc = "Computer vision based estimate. Might be up to scale."]
1628    MAV_ESTIMATOR_TYPE_VISION = 2,
1629    #[doc = "Visual-inertial estimate."]
1630    MAV_ESTIMATOR_TYPE_VIO = 3,
1631    #[doc = "Plain GPS estimate."]
1632    MAV_ESTIMATOR_TYPE_GPS = 4,
1633    #[doc = "Estimator integrating GPS and inertial sensing."]
1634    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
1635    #[doc = "Estimate from external motion capturing system."]
1636    MAV_ESTIMATOR_TYPE_MOCAP = 6,
1637    #[doc = "Estimator based on lidar sensor input."]
1638    MAV_ESTIMATOR_TYPE_LIDAR = 7,
1639    #[doc = "Estimator on autopilot."]
1640    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
1641}
1642impl MavEstimatorType {
1643    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
1644}
1645impl Default for MavEstimatorType {
1646    fn default() -> Self {
1647        Self::DEFAULT
1648    }
1649}
1650#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1651#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1652#[cfg_attr(feature = "serde", serde(tag = "type"))]
1653#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1654#[repr(u32)]
1655#[doc = "These flags encode the cellular network status"]
1656pub enum CellularStatusFlag {
1657    #[doc = "State unknown or not reportable."]
1658    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
1659    #[doc = "Modem is unusable"]
1660    CELLULAR_STATUS_FLAG_FAILED = 1,
1661    #[doc = "Modem is being initialized"]
1662    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
1663    #[doc = "Modem is locked"]
1664    CELLULAR_STATUS_FLAG_LOCKED = 3,
1665    #[doc = "Modem is not enabled and is powered down"]
1666    CELLULAR_STATUS_FLAG_DISABLED = 4,
1667    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
1668    CELLULAR_STATUS_FLAG_DISABLING = 5,
1669    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
1670    CELLULAR_STATUS_FLAG_ENABLING = 6,
1671    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
1672    CELLULAR_STATUS_FLAG_ENABLED = 7,
1673    #[doc = "Modem is searching for a network provider to register"]
1674    CELLULAR_STATUS_FLAG_SEARCHING = 8,
1675    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
1676    CELLULAR_STATUS_FLAG_REGISTERED = 9,
1677    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
1678    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
1679    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
1680    CELLULAR_STATUS_FLAG_CONNECTING = 11,
1681    #[doc = "One or more packet data bearers is active and connected"]
1682    CELLULAR_STATUS_FLAG_CONNECTED = 12,
1683}
1684impl CellularStatusFlag {
1685    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
1686}
1687impl Default for CellularStatusFlag {
1688    fn default() -> Self {
1689        Self::DEFAULT
1690    }
1691}
1692#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1693#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1694#[cfg_attr(feature = "serde", serde(tag = "type"))]
1695#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1696#[repr(u32)]
1697#[doc = "List of possible failure type to inject."]
1698pub enum FailureType {
1699    #[doc = "No failure injected, used to reset a previous failure."]
1700    FAILURE_TYPE_OK = 0,
1701    #[doc = "Sets unit off, so completely non-responsive."]
1702    FAILURE_TYPE_OFF = 1,
1703    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
1704    FAILURE_TYPE_STUCK = 2,
1705    #[doc = "Unit is reporting complete garbage."]
1706    FAILURE_TYPE_GARBAGE = 3,
1707    #[doc = "Unit is consistently wrong."]
1708    FAILURE_TYPE_WRONG = 4,
1709    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
1710    FAILURE_TYPE_SLOW = 5,
1711    #[doc = "Data of unit is delayed in time."]
1712    FAILURE_TYPE_DELAYED = 6,
1713    #[doc = "Unit is sometimes working, sometimes not."]
1714    FAILURE_TYPE_INTERMITTENT = 7,
1715}
1716impl FailureType {
1717    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
1718}
1719impl Default for FailureType {
1720    fn default() -> Self {
1721        Self::DEFAULT
1722    }
1723}
1724#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1725#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1726#[cfg_attr(feature = "serde", serde(tag = "type"))]
1727#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1728#[repr(u32)]
1729pub enum FenceBreach {
1730    #[doc = "No last fence breach"]
1731    FENCE_BREACH_NONE = 0,
1732    #[doc = "Breached minimum altitude"]
1733    FENCE_BREACH_MINALT = 1,
1734    #[doc = "Breached maximum altitude"]
1735    FENCE_BREACH_MAXALT = 2,
1736    #[doc = "Breached fence boundary"]
1737    FENCE_BREACH_BOUNDARY = 3,
1738}
1739impl FenceBreach {
1740    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
1741}
1742impl Default for FenceBreach {
1743    fn default() -> Self {
1744        Self::DEFAULT
1745    }
1746}
1747#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1748#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1749#[cfg_attr(feature = "serde", serde(tag = "type"))]
1750#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1751#[repr(u32)]
1752#[doc = "Specifies the datatype of a MAVLink parameter."]
1753pub enum MavParamType {
1754    #[doc = "8-bit unsigned integer"]
1755    MAV_PARAM_TYPE_UINT8 = 1,
1756    #[doc = "8-bit signed integer"]
1757    MAV_PARAM_TYPE_INT8 = 2,
1758    #[doc = "16-bit unsigned integer"]
1759    MAV_PARAM_TYPE_UINT16 = 3,
1760    #[doc = "16-bit signed integer"]
1761    MAV_PARAM_TYPE_INT16 = 4,
1762    #[doc = "32-bit unsigned integer"]
1763    MAV_PARAM_TYPE_UINT32 = 5,
1764    #[doc = "32-bit signed integer"]
1765    MAV_PARAM_TYPE_INT32 = 6,
1766    #[doc = "64-bit unsigned integer"]
1767    MAV_PARAM_TYPE_UINT64 = 7,
1768    #[doc = "64-bit signed integer"]
1769    MAV_PARAM_TYPE_INT64 = 8,
1770    #[doc = "32-bit floating-point"]
1771    MAV_PARAM_TYPE_REAL32 = 9,
1772    #[doc = "64-bit floating-point"]
1773    MAV_PARAM_TYPE_REAL64 = 10,
1774}
1775impl MavParamType {
1776    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
1777}
1778impl Default for MavParamType {
1779    fn default() -> Self {
1780        Self::DEFAULT
1781    }
1782}
1783#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1784#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1785#[cfg_attr(feature = "serde", serde(tag = "type"))]
1786#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1787#[repr(u32)]
1788#[doc = "Enumeration of landed detector states"]
1789pub enum MavLandedState {
1790    #[doc = "MAV landed state is unknown"]
1791    MAV_LANDED_STATE_UNDEFINED = 0,
1792    #[doc = "MAV is landed (on ground)"]
1793    MAV_LANDED_STATE_ON_GROUND = 1,
1794    #[doc = "MAV is in air"]
1795    MAV_LANDED_STATE_IN_AIR = 2,
1796    #[doc = "MAV currently taking off"]
1797    MAV_LANDED_STATE_TAKEOFF = 3,
1798    #[doc = "MAV currently landing"]
1799    MAV_LANDED_STATE_LANDING = 4,
1800}
1801impl MavLandedState {
1802    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
1803}
1804impl Default for MavLandedState {
1805    fn default() -> Self {
1806        Self::DEFAULT
1807    }
1808}
1809#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1810#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1811#[cfg_attr(feature = "serde", serde(tag = "type"))]
1812#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1813#[repr(u32)]
1814#[doc = "Camera tracking status flags"]
1815pub enum CameraTrackingStatusFlags {
1816    #[doc = "Camera is not tracking"]
1817    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
1818    #[doc = "Camera is tracking"]
1819    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
1820    #[doc = "Camera tracking in error state"]
1821    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
1822}
1823impl CameraTrackingStatusFlags {
1824    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
1825}
1826impl Default for CameraTrackingStatusFlags {
1827    fn default() -> Self {
1828        Self::DEFAULT
1829    }
1830}
1831bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
1832impl GimbalDeviceCapFlags {
1833    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
1834}
1835impl Default for GimbalDeviceCapFlags {
1836    fn default() -> Self {
1837        Self::DEFAULT
1838    }
1839}
1840bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1841impl HighresImuUpdatedFlags {
1842    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1843}
1844impl Default for HighresImuUpdatedFlags {
1845    fn default() -> Self {
1846        Self::DEFAULT
1847    }
1848}
1849#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1850#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1851#[cfg_attr(feature = "serde", serde(tag = "type"))]
1852#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1853#[repr(u32)]
1854#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
1855pub enum MavMode {
1856    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
1857    MAV_MODE_PREFLIGHT = 0,
1858    #[doc = "System is allowed to be active, under assisted RC control."]
1859    MAV_MODE_STABILIZE_DISARMED = 80,
1860    #[doc = "System is allowed to be active, under assisted RC control."]
1861    MAV_MODE_STABILIZE_ARMED = 208,
1862    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
1863    MAV_MODE_MANUAL_DISARMED = 64,
1864    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
1865    MAV_MODE_MANUAL_ARMED = 192,
1866    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
1867    MAV_MODE_GUIDED_DISARMED = 88,
1868    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
1869    MAV_MODE_GUIDED_ARMED = 216,
1870    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
1871    MAV_MODE_AUTO_DISARMED = 92,
1872    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
1873    MAV_MODE_AUTO_ARMED = 220,
1874    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
1875    MAV_MODE_TEST_DISARMED = 66,
1876    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
1877    MAV_MODE_TEST_ARMED = 194,
1878}
1879impl MavMode {
1880    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
1881}
1882impl Default for MavMode {
1883    fn default() -> Self {
1884        Self::DEFAULT
1885    }
1886}
1887#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1888#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1889#[cfg_attr(feature = "serde", serde(tag = "type"))]
1890#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1891#[repr(u32)]
1892#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
1893pub enum MavSeverity {
1894    #[doc = "System is unusable. This is a \"panic\" condition."]
1895    MAV_SEVERITY_EMERGENCY = 0,
1896    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
1897    MAV_SEVERITY_ALERT = 1,
1898    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
1899    MAV_SEVERITY_CRITICAL = 2,
1900    #[doc = "Indicates an error in secondary/redundant systems."]
1901    MAV_SEVERITY_ERROR = 3,
1902    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
1903    MAV_SEVERITY_WARNING = 4,
1904    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
1905    MAV_SEVERITY_NOTICE = 5,
1906    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
1907    MAV_SEVERITY_INFO = 6,
1908    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
1909    MAV_SEVERITY_DEBUG = 7,
1910}
1911impl MavSeverity {
1912    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
1913}
1914impl Default for MavSeverity {
1915    fn default() -> Self {
1916        Self::DEFAULT
1917    }
1918}
1919#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1920#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1921#[cfg_attr(feature = "serde", serde(tag = "type"))]
1922#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1923#[repr(u32)]
1924#[doc = "Possible responses from a CELLULAR_CONFIG message."]
1925pub enum CellularConfigResponse {
1926    #[doc = "Changes accepted."]
1927    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
1928    #[doc = "Invalid APN."]
1929    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
1930    #[doc = "Invalid PIN."]
1931    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
1932    #[doc = "Changes rejected."]
1933    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
1934    #[doc = "PUK is required to unblock SIM card."]
1935    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
1936}
1937impl CellularConfigResponse {
1938    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
1939}
1940impl Default for CellularConfigResponse {
1941    fn default() -> Self {
1942        Self::DEFAULT
1943    }
1944}
1945#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1946#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1947#[cfg_attr(feature = "serde", serde(tag = "type"))]
1948#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1949#[repr(u32)]
1950pub enum MavOdidClassificationType {
1951    #[doc = "The classification type for the UA is undeclared."]
1952    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
1953    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
1954    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
1955}
1956impl MavOdidClassificationType {
1957    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
1958}
1959impl Default for MavOdidClassificationType {
1960    fn default() -> Self {
1961        Self::DEFAULT
1962    }
1963}
1964#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1965#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1966#[cfg_attr(feature = "serde", serde(tag = "type"))]
1967#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1968#[repr(u32)]
1969pub enum MavlinkDataStreamType {
1970    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
1971    MAVLINK_DATA_STREAM_IMG_BMP = 1,
1972    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
1973    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
1974    MAVLINK_DATA_STREAM_IMG_PGM = 4,
1975    MAVLINK_DATA_STREAM_IMG_PNG = 5,
1976}
1977impl MavlinkDataStreamType {
1978    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
1979}
1980impl Default for MavlinkDataStreamType {
1981    fn default() -> Self {
1982        Self::DEFAULT
1983    }
1984}
1985bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
1986impl CameraTrackingTargetData {
1987    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
1988}
1989impl Default for CameraTrackingTargetData {
1990    fn default() -> Self {
1991        Self::DEFAULT
1992    }
1993}
1994#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1995#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1996#[cfg_attr(feature = "serde", serde(tag = "type"))]
1997#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1998#[repr(u32)]
1999#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
2000pub enum AutotuneAxis {
2001    #[doc = "Autotune roll axis."]
2002    AUTOTUNE_AXIS_ROLL = 1,
2003    #[doc = "Autotune pitch axis."]
2004    AUTOTUNE_AXIS_PITCH = 2,
2005    #[doc = "Autotune yaw axis."]
2006    AUTOTUNE_AXIS_YAW = 4,
2007}
2008impl AutotuneAxis {
2009    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
2010}
2011impl Default for AutotuneAxis {
2012    fn default() -> Self {
2013        Self::DEFAULT
2014    }
2015}
2016#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2017#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2018#[cfg_attr(feature = "serde", serde(tag = "type"))]
2019#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2020#[repr(u32)]
2021#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
2022pub enum CellularNetworkFailedReason {
2023    #[doc = "No error"]
2024    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
2025    #[doc = "Error state is unknown"]
2026    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
2027    #[doc = "SIM is required for the modem but missing"]
2028    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
2029    #[doc = "SIM is available, but not usable for connection"]
2030    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
2031}
2032impl CellularNetworkFailedReason {
2033    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
2034}
2035impl Default for CellularNetworkFailedReason {
2036    fn default() -> Self {
2037        Self::DEFAULT
2038    }
2039}
2040#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2041#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2042#[cfg_attr(feature = "serde", serde(tag = "type"))]
2043#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2044#[repr(u32)]
2045#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
2046pub enum MavCmd {
2047    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
2048    MAV_CMD_NAV_WAYPOINT = 16,
2049    #[doc = "Loiter around this waypoint an unlimited amount of time"]
2050    MAV_CMD_NAV_LOITER_UNLIM = 17,
2051    #[doc = "Loiter around this waypoint for X turns"]
2052    MAV_CMD_NAV_LOITER_TURNS = 18,
2053    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
2054    MAV_CMD_NAV_LOITER_TIME = 19,
2055    #[doc = "Return to launch location"]
2056    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
2057    #[doc = "Land at location."]
2058    MAV_CMD_NAV_LAND = 21,
2059    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
2060    MAV_CMD_NAV_TAKEOFF = 22,
2061    #[doc = "Land at local position (local frame only)"]
2062    MAV_CMD_NAV_LAND_LOCAL = 23,
2063    #[doc = "Takeoff from local position (local frame only)"]
2064    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
2065    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
2066    MAV_CMD_NAV_FOLLOW = 25,
2067    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
2068    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
2069    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
2070    MAV_CMD_NAV_LOITER_TO_ALT = 31,
2071    #[doc = "Begin following a target"]
2072    MAV_CMD_DO_FOLLOW = 32,
2073    #[doc = "Reposition the MAV after a follow target command has been sent"]
2074    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
2075    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
2076    MAV_CMD_DO_ORBIT = 34,
2077    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
2078    MAV_CMD_NAV_ROI = 80,
2079    #[doc = "Control autonomous path planning on the MAV."]
2080    MAV_CMD_NAV_PATHPLANNING = 81,
2081    #[doc = "Navigate to waypoint using a spline path."]
2082    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
2083    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
2084    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
2085    #[doc = "Land using VTOL mode"]
2086    MAV_CMD_NAV_VTOL_LAND = 85,
2087    #[doc = "hand control over to an external controller"]
2088    MAV_CMD_NAV_GUIDED_ENABLE = 92,
2089    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
2090    MAV_CMD_NAV_DELAY = 93,
2091    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
2092    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
2093    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
2094    MAV_CMD_NAV_LAST = 95,
2095    #[doc = "Delay mission state machine."]
2096    MAV_CMD_CONDITION_DELAY = 112,
2097    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
2098    MAV_CMD_CONDITION_CHANGE_ALT = 113,
2099    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
2100    MAV_CMD_CONDITION_DISTANCE = 114,
2101    #[doc = "Reach a certain target angle."]
2102    MAV_CMD_CONDITION_YAW = 115,
2103    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
2104    MAV_CMD_CONDITION_LAST = 159,
2105    #[doc = "Set system mode."]
2106    MAV_CMD_DO_SET_MODE = 176,
2107    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
2108    MAV_CMD_DO_JUMP = 177,
2109    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
2110    MAV_CMD_DO_CHANGE_SPEED = 178,
2111    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
2112    MAV_CMD_DO_SET_HOME = 179,
2113    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
2114    MAV_CMD_DO_SET_PARAMETER = 180,
2115    #[doc = "Set a relay to a condition."]
2116    MAV_CMD_DO_SET_RELAY = 181,
2117    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
2118    MAV_CMD_DO_REPEAT_RELAY = 182,
2119    #[doc = "Set a servo to a desired PWM value."]
2120    MAV_CMD_DO_SET_SERVO = 183,
2121    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
2122    MAV_CMD_DO_REPEAT_SERVO = 184,
2123    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
2124    MAV_CMD_DO_FLIGHTTERMINATION = 185,
2125    #[doc = "Change altitude set point."]
2126    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
2127    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
2128    MAV_CMD_DO_SET_ACTUATOR = 187,
2129    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
2130    MAV_CMD_DO_RETURN_PATH_START = 188,
2131    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
2132    MAV_CMD_DO_LAND_START = 189,
2133    #[doc = "Mission command to perform a landing from a rally point."]
2134    MAV_CMD_DO_RALLY_LAND = 190,
2135    #[doc = "Mission command to safely abort an autonomous landing."]
2136    MAV_CMD_DO_GO_AROUND = 191,
2137    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
2138    MAV_CMD_DO_REPOSITION = 192,
2139    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
2140    MAV_CMD_DO_PAUSE_CONTINUE = 193,
2141    #[doc = "Set moving direction to forward or reverse."]
2142    MAV_CMD_DO_SET_REVERSE = 194,
2143    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
2144    MAV_CMD_DO_SET_ROI_LOCATION = 195,
2145    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
2146    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
2147    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
2148    MAV_CMD_DO_SET_ROI_NONE = 197,
2149    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
2150    MAV_CMD_DO_SET_ROI_SYSID = 198,
2151    #[doc = "Control onboard camera system."]
2152    MAV_CMD_DO_CONTROL_VIDEO = 200,
2153    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
2154    MAV_CMD_DO_SET_ROI = 201,
2155    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
2156    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
2157    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
2158    MAV_CMD_DO_DIGICAM_CONTROL = 203,
2159    #[doc = "Mission command to configure a camera or antenna mount"]
2160    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
2161    #[doc = "Mission command to control a camera or antenna mount"]
2162    MAV_CMD_DO_MOUNT_CONTROL = 205,
2163    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
2164    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
2165    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
2166    MAV_CMD_DO_FENCE_ENABLE = 207,
2167    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
2168    MAV_CMD_DO_PARACHUTE = 208,
2169    #[doc = "Command to perform motor test."]
2170    MAV_CMD_DO_MOTOR_TEST = 209,
2171    #[doc = "Change to/from inverted flight."]
2172    MAV_CMD_DO_INVERTED_FLIGHT = 210,
2173    #[doc = "Mission command to operate a gripper."]
2174    MAV_CMD_DO_GRIPPER = 211,
2175    #[doc = "Enable/disable autotune."]
2176    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
2177    #[doc = "Sets a desired vehicle turn angle and speed change."]
2178    MAV_CMD_NAV_SET_YAW_SPEED = 213,
2179    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
2180    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
2181    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
2182    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
2183    #[doc = "set id of master controller"]
2184    MAV_CMD_DO_GUIDED_MASTER = 221,
2185    #[doc = "Set limits for external control"]
2186    MAV_CMD_DO_GUIDED_LIMITS = 222,
2187    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
2188    MAV_CMD_DO_ENGINE_CONTROL = 223,
2189    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
2190    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
2191    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
2192    MAV_CMD_DO_LAST = 240,
2193    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
2194    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
2195    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
2196    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
2197    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
2198    MAV_CMD_PREFLIGHT_UAVCAN = 243,
2199    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
2200    MAV_CMD_PREFLIGHT_STORAGE = 245,
2201    #[doc = "Request the reboot or shutdown of system components."]
2202    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
2203    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
2204    MAV_CMD_OVERRIDE_GOTO = 252,
2205    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
2206    MAV_CMD_OBLIQUE_SURVEY = 260,
2207    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
2208    MAV_CMD_DO_SET_STANDARD_MODE = 262,
2209    #[doc = "start running a mission"]
2210    MAV_CMD_MISSION_START = 300,
2211    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
2212    MAV_CMD_ACTUATOR_TEST = 310,
2213    #[doc = "Actuator configuration command."]
2214    MAV_CMD_CONFIGURE_ACTUATOR = 311,
2215    #[doc = "Arms / Disarms a component"]
2216    MAV_CMD_COMPONENT_ARM_DISARM = 400,
2217    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
2218    MAV_CMD_RUN_PREARM_CHECKS = 401,
2219    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
2220    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
2221    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
2222    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
2223    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
2224    MAV_CMD_GET_HOME_POSITION = 410,
2225    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
2226    MAV_CMD_INJECT_FAILURE = 420,
2227    #[doc = "Starts receiver pairing."]
2228    MAV_CMD_START_RX_PAIR = 500,
2229    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
2230    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
2231    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
2232    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
2233    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
2234    MAV_CMD_REQUEST_MESSAGE = 512,
2235    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
2236    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
2237    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
2238    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
2239    #[doc = "Request camera information (CAMERA_INFORMATION)."]
2240    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
2241    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
2242    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
2243    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
2244    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
2245    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
2246    MAV_CMD_STORAGE_FORMAT = 526,
2247    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
2248    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
2249    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
2250    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
2251    #[doc = "Reset all camera settings to Factory Default"]
2252    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
2253    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
2254    MAV_CMD_SET_CAMERA_MODE = 530,
2255    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
2256    MAV_CMD_SET_CAMERA_ZOOM = 531,
2257    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
2258    MAV_CMD_SET_CAMERA_FOCUS = 532,
2259    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
2260    MAV_CMD_SET_STORAGE_USAGE = 533,
2261    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
2262    MAV_CMD_SET_CAMERA_SOURCE = 534,
2263    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
2264    MAV_CMD_JUMP_TAG = 600,
2265    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
2266    MAV_CMD_DO_JUMP_TAG = 601,
2267    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
2268    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
2269    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
2270    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
2271    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
2272    MAV_CMD_IMAGE_START_CAPTURE = 2000,
2273    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
2274    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
2275    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
2276    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
2277    #[doc = "Enable or disable on-board camera triggering system."]
2278    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
2279    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
2280    MAV_CMD_CAMERA_TRACK_POINT = 2004,
2281    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
2282    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
2283    #[doc = "Stops ongoing tracking."]
2284    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
2285    #[doc = "Starts video capture (recording)."]
2286    MAV_CMD_VIDEO_START_CAPTURE = 2500,
2287    #[doc = "Stop the current video capture (recording)."]
2288    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
2289    #[doc = "Start video streaming"]
2290    MAV_CMD_VIDEO_START_STREAMING = 2502,
2291    #[doc = "Stop the given video stream"]
2292    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
2293    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
2294    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
2295    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
2296    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
2297    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
2298    MAV_CMD_LOGGING_START = 2510,
2299    #[doc = "Request to stop streaming log data over MAVLink"]
2300    MAV_CMD_LOGGING_STOP = 2511,
2301    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
2302    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
2303    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
2304    #[doc = "Create a panorama at the current position"]
2305    MAV_CMD_PANORAMA_CREATE = 2800,
2306    #[doc = "Request VTOL transition"]
2307    MAV_CMD_DO_VTOL_TRANSITION = 3000,
2308    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
2309    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
2310    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
2311    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
2312    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
2313    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
2314    #[doc = "Delay mission state machine until gate has been reached."]
2315    MAV_CMD_CONDITION_GATE = 4501,
2316    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
2317    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
2318    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
2319    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
2320    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
2321    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
2322    #[doc = "Circular fence area. The vehicle must stay inside this area."]
2323    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
2324    #[doc = "Circular fence area. The vehicle must stay outside this area."]
2325    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
2326    #[doc = "Rally point. You can have multiple rally points defined."]
2327    MAV_CMD_NAV_RALLY_POINT = 5100,
2328    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
2329    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
2330    #[doc = "Change state of safety switch."]
2331    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
2332    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
2333    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
2334    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
2335    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
2336    #[doc = "Control the payload deployment."]
2337    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
2338    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
2339    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
2340    #[doc = "Command to operate winch."]
2341    MAV_CMD_DO_WINCH = 42600,
2342    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
2343    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
2344    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
2345    MAV_CMD_WAYPOINT_USER_1 = 31000,
2346    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
2347    MAV_CMD_WAYPOINT_USER_2 = 31001,
2348    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
2349    MAV_CMD_WAYPOINT_USER_3 = 31002,
2350    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
2351    MAV_CMD_WAYPOINT_USER_4 = 31003,
2352    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
2353    MAV_CMD_WAYPOINT_USER_5 = 31004,
2354    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
2355    MAV_CMD_SPATIAL_USER_1 = 31005,
2356    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
2357    MAV_CMD_SPATIAL_USER_2 = 31006,
2358    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
2359    MAV_CMD_SPATIAL_USER_3 = 31007,
2360    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
2361    MAV_CMD_SPATIAL_USER_4 = 31008,
2362    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
2363    MAV_CMD_SPATIAL_USER_5 = 31009,
2364    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
2365    MAV_CMD_USER_1 = 31010,
2366    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
2367    MAV_CMD_USER_2 = 31011,
2368    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
2369    MAV_CMD_USER_3 = 31012,
2370    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
2371    MAV_CMD_USER_4 = 31013,
2372    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
2373    MAV_CMD_USER_5 = 31014,
2374    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
2375    MAV_CMD_CAN_FORWARD = 32000,
2376    #[doc = "AVSS defined command. Set PRS arm statuses."]
2377    MAV_CMD_PRS_SET_ARM = 60050,
2378    #[doc = "AVSS defined command. Gets PRS arm statuses"]
2379    MAV_CMD_PRS_GET_ARM = 60051,
2380    #[doc = "AVSS defined command.  Get the PRS battery voltage in millivolts"]
2381    MAV_CMD_PRS_GET_BATTERY = 60052,
2382    #[doc = "AVSS defined command. Get the PRS error statuses."]
2383    MAV_CMD_PRS_GET_ERR = 60053,
2384    #[doc = "AVSS defined command. Set the ATS arming altitude in meters."]
2385    MAV_CMD_PRS_SET_ARM_ALTI = 60070,
2386    #[doc = "AVSS defined command. Get the ATS arming altitude in meters."]
2387    MAV_CMD_PRS_GET_ARM_ALTI = 60071,
2388    #[doc = "AVSS defined command. Shuts down the PRS system."]
2389    MAV_CMD_PRS_SHUTDOWN = 60072,
2390}
2391impl MavCmd {
2392    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
2393}
2394impl Default for MavCmd {
2395    fn default() -> Self {
2396        Self::DEFAULT
2397    }
2398}
2399bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
2400impl EscFailureFlags {
2401    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
2402}
2403impl Default for EscFailureFlags {
2404    fn default() -> Self {
2405        Self::DEFAULT
2406    }
2407}
2408#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2409#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2410#[cfg_attr(feature = "serde", serde(tag = "type"))]
2411#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2412#[repr(u32)]
2413#[doc = "Camera tracking modes"]
2414pub enum CameraTrackingMode {
2415    #[doc = "Not tracking"]
2416    CAMERA_TRACKING_MODE_NONE = 0,
2417    #[doc = "Target is a point"]
2418    CAMERA_TRACKING_MODE_POINT = 1,
2419    #[doc = "Target is a rectangle"]
2420    CAMERA_TRACKING_MODE_RECTANGLE = 2,
2421}
2422impl CameraTrackingMode {
2423    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
2424}
2425impl Default for CameraTrackingMode {
2426    fn default() -> Self {
2427        Self::DEFAULT
2428    }
2429}
2430#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2431#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2432#[cfg_attr(feature = "serde", serde(tag = "type"))]
2433#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2434#[repr(u32)]
2435#[doc = "Indicates the ESC connection type."]
2436pub enum EscConnectionType {
2437    #[doc = "Traditional PPM ESC."]
2438    ESC_CONNECTION_TYPE_PPM = 0,
2439    #[doc = "Serial Bus connected ESC."]
2440    ESC_CONNECTION_TYPE_SERIAL = 1,
2441    #[doc = "One Shot PPM ESC."]
2442    ESC_CONNECTION_TYPE_ONESHOT = 2,
2443    #[doc = "I2C ESC."]
2444    ESC_CONNECTION_TYPE_I2C = 3,
2445    #[doc = "CAN-Bus ESC."]
2446    ESC_CONNECTION_TYPE_CAN = 4,
2447    #[doc = "DShot ESC."]
2448    ESC_CONNECTION_TYPE_DSHOT = 5,
2449}
2450impl EscConnectionType {
2451    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
2452}
2453impl Default for EscConnectionType {
2454    fn default() -> Self {
2455        Self::DEFAULT
2456    }
2457}
2458bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2459impl MavModeFlag {
2460    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2461}
2462impl Default for MavModeFlag {
2463    fn default() -> Self {
2464        Self::DEFAULT
2465    }
2466}
2467#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2468#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2469#[cfg_attr(feature = "serde", serde(tag = "type"))]
2470#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2471#[repr(u32)]
2472#[doc = "Enumeration of battery types"]
2473pub enum MavBatteryType {
2474    #[doc = "Not specified."]
2475    MAV_BATTERY_TYPE_UNKNOWN = 0,
2476    #[doc = "Lithium polymer battery"]
2477    MAV_BATTERY_TYPE_LIPO = 1,
2478    #[doc = "Lithium-iron-phosphate battery"]
2479    MAV_BATTERY_TYPE_LIFE = 2,
2480    #[doc = "Lithium-ION battery"]
2481    MAV_BATTERY_TYPE_LION = 3,
2482    #[doc = "Nickel metal hydride battery"]
2483    MAV_BATTERY_TYPE_NIMH = 4,
2484}
2485impl MavBatteryType {
2486    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
2487}
2488impl Default for MavBatteryType {
2489    fn default() -> Self {
2490        Self::DEFAULT
2491    }
2492}
2493bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
2494impl GimbalManagerFlags {
2495    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
2496}
2497impl Default for GimbalManagerFlags {
2498    fn default() -> Self {
2499        Self::DEFAULT
2500    }
2501}
2502#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2503#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2504#[cfg_attr(feature = "serde", serde(tag = "type"))]
2505#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2506#[repr(u32)]
2507#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2508pub enum MavMissionResult {
2509    #[doc = "mission accepted OK"]
2510    MAV_MISSION_ACCEPTED = 0,
2511    #[doc = "Generic error / not accepting mission commands at all right now."]
2512    MAV_MISSION_ERROR = 1,
2513    #[doc = "Coordinate frame is not supported."]
2514    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2515    #[doc = "Command is not supported."]
2516    MAV_MISSION_UNSUPPORTED = 3,
2517    #[doc = "Mission items exceed storage space."]
2518    MAV_MISSION_NO_SPACE = 4,
2519    #[doc = "One of the parameters has an invalid value."]
2520    MAV_MISSION_INVALID = 5,
2521    #[doc = "param1 has an invalid value."]
2522    MAV_MISSION_INVALID_PARAM1 = 6,
2523    #[doc = "param2 has an invalid value."]
2524    MAV_MISSION_INVALID_PARAM2 = 7,
2525    #[doc = "param3 has an invalid value."]
2526    MAV_MISSION_INVALID_PARAM3 = 8,
2527    #[doc = "param4 has an invalid value."]
2528    MAV_MISSION_INVALID_PARAM4 = 9,
2529    #[doc = "x / param5 has an invalid value."]
2530    MAV_MISSION_INVALID_PARAM5_X = 10,
2531    #[doc = "y / param6 has an invalid value."]
2532    MAV_MISSION_INVALID_PARAM6_Y = 11,
2533    #[doc = "z / param7 has an invalid value."]
2534    MAV_MISSION_INVALID_PARAM7 = 12,
2535    #[doc = "Mission item received out of sequence"]
2536    MAV_MISSION_INVALID_SEQUENCE = 13,
2537    #[doc = "Not accepting any mission commands from this communication partner."]
2538    MAV_MISSION_DENIED = 14,
2539    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2540    MAV_MISSION_OPERATION_CANCELLED = 15,
2541}
2542impl MavMissionResult {
2543    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2544}
2545impl Default for MavMissionResult {
2546    fn default() -> Self {
2547        Self::DEFAULT
2548    }
2549}
2550#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2551#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2552#[cfg_attr(feature = "serde", serde(tag = "type"))]
2553#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2554#[repr(u32)]
2555#[doc = "Cellular network radio type"]
2556pub enum CellularNetworkRadioType {
2557    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
2558    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
2559    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
2560    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
2561    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
2562}
2563impl CellularNetworkRadioType {
2564    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
2565}
2566impl Default for CellularNetworkRadioType {
2567    fn default() -> Self {
2568        Self::DEFAULT
2569    }
2570}
2571#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2572#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2573#[cfg_attr(feature = "serde", serde(tag = "type"))]
2574#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2575#[repr(u32)]
2576#[doc = "Airborne status of UAS."]
2577pub enum UtmFlightState {
2578    #[doc = "The flight state can't be determined."]
2579    UTM_FLIGHT_STATE_UNKNOWN = 1,
2580    #[doc = "UAS on ground."]
2581    UTM_FLIGHT_STATE_GROUND = 2,
2582    #[doc = "UAS airborne."]
2583    UTM_FLIGHT_STATE_AIRBORNE = 3,
2584    #[doc = "UAS is in an emergency flight state."]
2585    UTM_FLIGHT_STATE_EMERGENCY = 16,
2586    #[doc = "UAS has no active controls."]
2587    UTM_FLIGHT_STATE_NOCTRL = 32,
2588}
2589impl UtmFlightState {
2590    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
2591}
2592impl Default for UtmFlightState {
2593    fn default() -> Self {
2594        Self::DEFAULT
2595    }
2596}
2597bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
2598impl GimbalManagerCapFlags {
2599    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
2600}
2601impl Default for GimbalManagerCapFlags {
2602    fn default() -> Self {
2603        Self::DEFAULT
2604    }
2605}
2606bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
2607impl HlFailureFlag {
2608    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
2609}
2610impl Default for HlFailureFlag {
2611    fn default() -> Self {
2612        Self::DEFAULT
2613    }
2614}
2615bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2616impl MavModeProperty {
2617    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2618}
2619impl Default for MavModeProperty {
2620    fn default() -> Self {
2621        Self::DEFAULT
2622    }
2623}
2624#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2625#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2626#[cfg_attr(feature = "serde", serde(tag = "type"))]
2627#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2628#[repr(u32)]
2629#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
2630pub enum MavComponent {
2631    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
2632    MAV_COMP_ID_ALL = 0,
2633    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
2634    MAV_COMP_ID_AUTOPILOT1 = 1,
2635    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2636    MAV_COMP_ID_USER1 = 25,
2637    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2638    MAV_COMP_ID_USER2 = 26,
2639    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2640    MAV_COMP_ID_USER3 = 27,
2641    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2642    MAV_COMP_ID_USER4 = 28,
2643    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2644    MAV_COMP_ID_USER5 = 29,
2645    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2646    MAV_COMP_ID_USER6 = 30,
2647    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2648    MAV_COMP_ID_USER7 = 31,
2649    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2650    MAV_COMP_ID_USER8 = 32,
2651    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2652    MAV_COMP_ID_USER9 = 33,
2653    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2654    MAV_COMP_ID_USER10 = 34,
2655    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2656    MAV_COMP_ID_USER11 = 35,
2657    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2658    MAV_COMP_ID_USER12 = 36,
2659    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2660    MAV_COMP_ID_USER13 = 37,
2661    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2662    MAV_COMP_ID_USER14 = 38,
2663    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2664    MAV_COMP_ID_USER15 = 39,
2665    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2666    MAV_COMP_ID_USER16 = 40,
2667    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2668    MAV_COMP_ID_USER17 = 41,
2669    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2670    MAV_COMP_ID_USER18 = 42,
2671    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2672    MAV_COMP_ID_USER19 = 43,
2673    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2674    MAV_COMP_ID_USER20 = 44,
2675    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2676    MAV_COMP_ID_USER21 = 45,
2677    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2678    MAV_COMP_ID_USER22 = 46,
2679    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2680    MAV_COMP_ID_USER23 = 47,
2681    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2682    MAV_COMP_ID_USER24 = 48,
2683    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2684    MAV_COMP_ID_USER25 = 49,
2685    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2686    MAV_COMP_ID_USER26 = 50,
2687    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2688    MAV_COMP_ID_USER27 = 51,
2689    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2690    MAV_COMP_ID_USER28 = 52,
2691    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2692    MAV_COMP_ID_USER29 = 53,
2693    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2694    MAV_COMP_ID_USER30 = 54,
2695    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2696    MAV_COMP_ID_USER31 = 55,
2697    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2698    MAV_COMP_ID_USER32 = 56,
2699    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2700    MAV_COMP_ID_USER33 = 57,
2701    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2702    MAV_COMP_ID_USER34 = 58,
2703    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2704    MAV_COMP_ID_USER35 = 59,
2705    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2706    MAV_COMP_ID_USER36 = 60,
2707    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2708    MAV_COMP_ID_USER37 = 61,
2709    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2710    MAV_COMP_ID_USER38 = 62,
2711    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2712    MAV_COMP_ID_USER39 = 63,
2713    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2714    MAV_COMP_ID_USER40 = 64,
2715    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2716    MAV_COMP_ID_USER41 = 65,
2717    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2718    MAV_COMP_ID_USER42 = 66,
2719    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2720    MAV_COMP_ID_USER43 = 67,
2721    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
2722    MAV_COMP_ID_TELEMETRY_RADIO = 68,
2723    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2724    MAV_COMP_ID_USER45 = 69,
2725    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2726    MAV_COMP_ID_USER46 = 70,
2727    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2728    MAV_COMP_ID_USER47 = 71,
2729    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2730    MAV_COMP_ID_USER48 = 72,
2731    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2732    MAV_COMP_ID_USER49 = 73,
2733    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2734    MAV_COMP_ID_USER50 = 74,
2735    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2736    MAV_COMP_ID_USER51 = 75,
2737    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2738    MAV_COMP_ID_USER52 = 76,
2739    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2740    MAV_COMP_ID_USER53 = 77,
2741    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2742    MAV_COMP_ID_USER54 = 78,
2743    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2744    MAV_COMP_ID_USER55 = 79,
2745    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2746    MAV_COMP_ID_USER56 = 80,
2747    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2748    MAV_COMP_ID_USER57 = 81,
2749    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2750    MAV_COMP_ID_USER58 = 82,
2751    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2752    MAV_COMP_ID_USER59 = 83,
2753    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2754    MAV_COMP_ID_USER60 = 84,
2755    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2756    MAV_COMP_ID_USER61 = 85,
2757    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2758    MAV_COMP_ID_USER62 = 86,
2759    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2760    MAV_COMP_ID_USER63 = 87,
2761    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2762    MAV_COMP_ID_USER64 = 88,
2763    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2764    MAV_COMP_ID_USER65 = 89,
2765    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2766    MAV_COMP_ID_USER66 = 90,
2767    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2768    MAV_COMP_ID_USER67 = 91,
2769    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2770    MAV_COMP_ID_USER68 = 92,
2771    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2772    MAV_COMP_ID_USER69 = 93,
2773    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2774    MAV_COMP_ID_USER70 = 94,
2775    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2776    MAV_COMP_ID_USER71 = 95,
2777    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2778    MAV_COMP_ID_USER72 = 96,
2779    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2780    MAV_COMP_ID_USER73 = 97,
2781    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2782    MAV_COMP_ID_USER74 = 98,
2783    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2784    MAV_COMP_ID_USER75 = 99,
2785    #[doc = "Camera #1."]
2786    MAV_COMP_ID_CAMERA = 100,
2787    #[doc = "Camera #2."]
2788    MAV_COMP_ID_CAMERA2 = 101,
2789    #[doc = "Camera #3."]
2790    MAV_COMP_ID_CAMERA3 = 102,
2791    #[doc = "Camera #4."]
2792    MAV_COMP_ID_CAMERA4 = 103,
2793    #[doc = "Camera #5."]
2794    MAV_COMP_ID_CAMERA5 = 104,
2795    #[doc = "Camera #6."]
2796    MAV_COMP_ID_CAMERA6 = 105,
2797    #[doc = "Servo #1."]
2798    MAV_COMP_ID_SERVO1 = 140,
2799    #[doc = "Servo #2."]
2800    MAV_COMP_ID_SERVO2 = 141,
2801    #[doc = "Servo #3."]
2802    MAV_COMP_ID_SERVO3 = 142,
2803    #[doc = "Servo #4."]
2804    MAV_COMP_ID_SERVO4 = 143,
2805    #[doc = "Servo #5."]
2806    MAV_COMP_ID_SERVO5 = 144,
2807    #[doc = "Servo #6."]
2808    MAV_COMP_ID_SERVO6 = 145,
2809    #[doc = "Servo #7."]
2810    MAV_COMP_ID_SERVO7 = 146,
2811    #[doc = "Servo #8."]
2812    MAV_COMP_ID_SERVO8 = 147,
2813    #[doc = "Servo #9."]
2814    MAV_COMP_ID_SERVO9 = 148,
2815    #[doc = "Servo #10."]
2816    MAV_COMP_ID_SERVO10 = 149,
2817    #[doc = "Servo #11."]
2818    MAV_COMP_ID_SERVO11 = 150,
2819    #[doc = "Servo #12."]
2820    MAV_COMP_ID_SERVO12 = 151,
2821    #[doc = "Servo #13."]
2822    MAV_COMP_ID_SERVO13 = 152,
2823    #[doc = "Servo #14."]
2824    MAV_COMP_ID_SERVO14 = 153,
2825    #[doc = "Gimbal #1."]
2826    MAV_COMP_ID_GIMBAL = 154,
2827    #[doc = "Logging component."]
2828    MAV_COMP_ID_LOG = 155,
2829    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
2830    MAV_COMP_ID_ADSB = 156,
2831    #[doc = "On Screen Display (OSD) devices for video links."]
2832    MAV_COMP_ID_OSD = 157,
2833    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
2834    MAV_COMP_ID_PERIPHERAL = 158,
2835    #[doc = "Gimbal ID for QX1."]
2836    MAV_COMP_ID_QX1_GIMBAL = 159,
2837    #[doc = "FLARM collision alert component."]
2838    MAV_COMP_ID_FLARM = 160,
2839    #[doc = "Parachute component."]
2840    MAV_COMP_ID_PARACHUTE = 161,
2841    #[doc = "Winch component."]
2842    MAV_COMP_ID_WINCH = 169,
2843    #[doc = "Gimbal #2."]
2844    MAV_COMP_ID_GIMBAL2 = 171,
2845    #[doc = "Gimbal #3."]
2846    MAV_COMP_ID_GIMBAL3 = 172,
2847    #[doc = "Gimbal #4"]
2848    MAV_COMP_ID_GIMBAL4 = 173,
2849    #[doc = "Gimbal #5."]
2850    MAV_COMP_ID_GIMBAL5 = 174,
2851    #[doc = "Gimbal #6."]
2852    MAV_COMP_ID_GIMBAL6 = 175,
2853    #[doc = "Battery #1."]
2854    MAV_COMP_ID_BATTERY = 180,
2855    #[doc = "Battery #2."]
2856    MAV_COMP_ID_BATTERY2 = 181,
2857    #[doc = "CAN over MAVLink client."]
2858    MAV_COMP_ID_MAVCAN = 189,
2859    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
2860    MAV_COMP_ID_MISSIONPLANNER = 190,
2861    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2862    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
2863    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2864    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
2865    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2866    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
2867    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2868    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
2869    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
2870    MAV_COMP_ID_PATHPLANNER = 195,
2871    #[doc = "Component that plans a collision free path between two points."]
2872    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2873    #[doc = "Component that provides position estimates using VIO techniques."]
2874    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2875    #[doc = "Component that manages pairing of vehicle and GCS."]
2876    MAV_COMP_ID_PAIRING_MANAGER = 198,
2877    #[doc = "Inertial Measurement Unit (IMU) #1."]
2878    MAV_COMP_ID_IMU = 200,
2879    #[doc = "Inertial Measurement Unit (IMU) #2."]
2880    MAV_COMP_ID_IMU_2 = 201,
2881    #[doc = "Inertial Measurement Unit (IMU) #3."]
2882    MAV_COMP_ID_IMU_3 = 202,
2883    #[doc = "GPS #1."]
2884    MAV_COMP_ID_GPS = 220,
2885    #[doc = "GPS #2."]
2886    MAV_COMP_ID_GPS2 = 221,
2887    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2888    MAV_COMP_ID_ODID_TXRX_1 = 236,
2889    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2890    MAV_COMP_ID_ODID_TXRX_2 = 237,
2891    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2892    MAV_COMP_ID_ODID_TXRX_3 = 238,
2893    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2894    MAV_COMP_ID_UDP_BRIDGE = 240,
2895    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2896    MAV_COMP_ID_UART_BRIDGE = 241,
2897    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2898    MAV_COMP_ID_TUNNEL_NODE = 242,
2899    #[doc = "Illuminator"]
2900    MAV_COMP_ID_ILLUMINATOR = 243,
2901    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2902    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2903}
2904impl MavComponent {
2905    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2906}
2907impl Default for MavComponent {
2908    fn default() -> Self {
2909        Self::DEFAULT
2910    }
2911}
2912#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2913#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2914#[cfg_attr(feature = "serde", serde(tag = "type"))]
2915#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2916#[repr(u32)]
2917#[doc = "Possible actions an aircraft can take to avoid a collision."]
2918pub enum MavCollisionAction {
2919    #[doc = "Ignore any potential collisions"]
2920    MAV_COLLISION_ACTION_NONE = 0,
2921    #[doc = "Report potential collision"]
2922    MAV_COLLISION_ACTION_REPORT = 1,
2923    #[doc = "Ascend or Descend to avoid threat"]
2924    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
2925    #[doc = "Move horizontally to avoid threat"]
2926    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
2927    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
2928    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
2929    #[doc = "Aircraft to fly directly back to its launch point"]
2930    MAV_COLLISION_ACTION_RTL = 5,
2931    #[doc = "Aircraft to stop in place"]
2932    MAV_COLLISION_ACTION_HOVER = 6,
2933}
2934impl MavCollisionAction {
2935    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
2936}
2937impl Default for MavCollisionAction {
2938    fn default() -> Self {
2939        Self::DEFAULT
2940    }
2941}
2942#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2943#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2944#[cfg_attr(feature = "serde", serde(tag = "type"))]
2945#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2946#[repr(u32)]
2947#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
2948pub enum WifiConfigApResponse {
2949    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
2950    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
2951    #[doc = "Changes accepted."]
2952    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
2953    #[doc = "Changes rejected."]
2954    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
2955    #[doc = "Invalid Mode."]
2956    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
2957    #[doc = "Invalid SSID."]
2958    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
2959    #[doc = "Invalid Password."]
2960    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
2961}
2962impl WifiConfigApResponse {
2963    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
2964}
2965impl Default for WifiConfigApResponse {
2966    fn default() -> Self {
2967        Self::DEFAULT
2968    }
2969}
2970bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
2971impl MavProtocolCapability {
2972    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
2973}
2974impl Default for MavProtocolCapability {
2975    fn default() -> Self {
2976        Self::DEFAULT
2977    }
2978}
2979#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2980#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2981#[cfg_attr(feature = "serde", serde(tag = "type"))]
2982#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2983#[repr(u32)]
2984pub enum MavOdidAuthType {
2985    #[doc = "No authentication type is specified."]
2986    MAV_ODID_AUTH_TYPE_NONE = 0,
2987    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2988    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2989    #[doc = "Signature for the Operator ID."]
2990    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2991    #[doc = "Signature for the entire message set."]
2992    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2993    #[doc = "Authentication is provided by Network Remote ID."]
2994    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2995    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2996    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2997}
2998impl MavOdidAuthType {
2999    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
3000}
3001impl Default for MavOdidAuthType {
3002    fn default() -> Self {
3003        Self::DEFAULT
3004    }
3005}
3006#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3007#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3008#[cfg_attr(feature = "serde", serde(tag = "type"))]
3009#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3010#[repr(u32)]
3011pub enum MavOdidTimeAcc {
3012    #[doc = "The timestamp accuracy is unknown."]
3013    MAV_ODID_TIME_ACC_UNKNOWN = 0,
3014    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
3015    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
3016    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
3017    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
3018    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
3019    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
3020    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
3021    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
3022    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
3023    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
3024    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
3025    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
3026    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
3027    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
3028    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
3029    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
3030    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
3031    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
3032    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
3033    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
3034    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
3035    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
3036    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
3037    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
3038    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
3039    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
3040    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
3041    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
3042    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
3043    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
3044}
3045impl MavOdidTimeAcc {
3046    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
3047}
3048impl Default for MavOdidTimeAcc {
3049    fn default() -> Self {
3050        Self::DEFAULT
3051    }
3052}
3053#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3054#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3055#[cfg_attr(feature = "serde", serde(tag = "type"))]
3056#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3057#[repr(u32)]
3058pub enum MavOdidHorAcc {
3059    #[doc = "The horizontal accuracy is unknown."]
3060    MAV_ODID_HOR_ACC_UNKNOWN = 0,
3061    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
3062    MAV_ODID_HOR_ACC_10NM = 1,
3063    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
3064    MAV_ODID_HOR_ACC_4NM = 2,
3065    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
3066    MAV_ODID_HOR_ACC_2NM = 3,
3067    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
3068    MAV_ODID_HOR_ACC_1NM = 4,
3069    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
3070    MAV_ODID_HOR_ACC_0_5NM = 5,
3071    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
3072    MAV_ODID_HOR_ACC_0_3NM = 6,
3073    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
3074    MAV_ODID_HOR_ACC_0_1NM = 7,
3075    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
3076    MAV_ODID_HOR_ACC_0_05NM = 8,
3077    #[doc = "The horizontal accuracy is smaller than 30 meter."]
3078    MAV_ODID_HOR_ACC_30_METER = 9,
3079    #[doc = "The horizontal accuracy is smaller than 10 meter."]
3080    MAV_ODID_HOR_ACC_10_METER = 10,
3081    #[doc = "The horizontal accuracy is smaller than 3 meter."]
3082    MAV_ODID_HOR_ACC_3_METER = 11,
3083    #[doc = "The horizontal accuracy is smaller than 1 meter."]
3084    MAV_ODID_HOR_ACC_1_METER = 12,
3085}
3086impl MavOdidHorAcc {
3087    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
3088}
3089impl Default for MavOdidHorAcc {
3090    fn default() -> Self {
3091        Self::DEFAULT
3092    }
3093}
3094#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3095#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3096#[cfg_attr(feature = "serde", serde(tag = "type"))]
3097#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3098#[repr(u32)]
3099#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
3100pub enum MavAutopilot {
3101    #[doc = "Generic autopilot, full support for everything"]
3102    MAV_AUTOPILOT_GENERIC = 0,
3103    #[doc = "Reserved for future use."]
3104    MAV_AUTOPILOT_RESERVED = 1,
3105    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
3106    MAV_AUTOPILOT_SLUGS = 2,
3107    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
3108    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
3109    #[doc = "OpenPilot, <http://openpilot.org>"]
3110    MAV_AUTOPILOT_OPENPILOT = 4,
3111    #[doc = "Generic autopilot only supporting simple waypoints"]
3112    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
3113    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
3114    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
3115    #[doc = "Generic autopilot supporting the full mission command set"]
3116    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
3117    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
3118    MAV_AUTOPILOT_INVALID = 8,
3119    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
3120    MAV_AUTOPILOT_PPZ = 9,
3121    #[doc = "UAV Dev Board"]
3122    MAV_AUTOPILOT_UDB = 10,
3123    #[doc = "FlexiPilot"]
3124    MAV_AUTOPILOT_FP = 11,
3125    #[doc = "PX4 Autopilot - <http://px4.io/>"]
3126    MAV_AUTOPILOT_PX4 = 12,
3127    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
3128    MAV_AUTOPILOT_SMACCMPILOT = 13,
3129    #[doc = "AutoQuad -- <http://autoquad.org>"]
3130    MAV_AUTOPILOT_AUTOQUAD = 14,
3131    #[doc = "Armazila -- <http://armazila.com>"]
3132    MAV_AUTOPILOT_ARMAZILA = 15,
3133    #[doc = "Aerob -- <http://aerob.ru>"]
3134    MAV_AUTOPILOT_AEROB = 16,
3135    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
3136    MAV_AUTOPILOT_ASLUAV = 17,
3137    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
3138    MAV_AUTOPILOT_SMARTAP = 18,
3139    #[doc = "AirRails - <http://uaventure.com>"]
3140    MAV_AUTOPILOT_AIRRAILS = 19,
3141    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
3142    MAV_AUTOPILOT_REFLEX = 20,
3143}
3144impl MavAutopilot {
3145    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
3146}
3147impl Default for MavAutopilot {
3148    fn default() -> Self {
3149        Self::DEFAULT
3150    }
3151}
3152#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3153#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3154#[cfg_attr(feature = "serde", serde(tag = "type"))]
3155#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3156#[repr(u32)]
3157#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
3158pub enum MavFrame {
3159    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
3160    MAV_FRAME_GLOBAL = 0,
3161    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
3162    MAV_FRAME_LOCAL_NED = 1,
3163    #[doc = "NOT a coordinate frame, indicates a mission command."]
3164    MAV_FRAME_MISSION = 2,
3165    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
3166    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
3167    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
3168    MAV_FRAME_LOCAL_ENU = 4,
3169    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
3170    MAV_FRAME_GLOBAL_INT = 5,
3171    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
3172    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
3173    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
3174    MAV_FRAME_LOCAL_OFFSET_NED = 7,
3175    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
3176    MAV_FRAME_BODY_NED = 8,
3177    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
3178    MAV_FRAME_BODY_OFFSET_NED = 9,
3179    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
3180    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
3181    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
3182    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
3183    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
3184    MAV_FRAME_BODY_FRD = 12,
3185    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
3186    MAV_FRAME_RESERVED_13 = 13,
3187    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
3188    MAV_FRAME_RESERVED_14 = 14,
3189    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
3190    MAV_FRAME_RESERVED_15 = 15,
3191    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
3192    MAV_FRAME_RESERVED_16 = 16,
3193    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
3194    MAV_FRAME_RESERVED_17 = 17,
3195    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
3196    MAV_FRAME_RESERVED_18 = 18,
3197    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
3198    MAV_FRAME_RESERVED_19 = 19,
3199    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
3200    MAV_FRAME_LOCAL_FRD = 20,
3201    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
3202    MAV_FRAME_LOCAL_FLU = 21,
3203}
3204impl MavFrame {
3205    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
3206}
3207impl Default for MavFrame {
3208    fn default() -> Self {
3209        Self::DEFAULT
3210    }
3211}
3212#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3213#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3214#[cfg_attr(feature = "serde", serde(tag = "type"))]
3215#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3216#[repr(u32)]
3217#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3218pub enum MavType {
3219    #[doc = "Generic micro air vehicle"]
3220    MAV_TYPE_GENERIC = 0,
3221    #[doc = "Fixed wing aircraft."]
3222    MAV_TYPE_FIXED_WING = 1,
3223    #[doc = "Quadrotor"]
3224    MAV_TYPE_QUADROTOR = 2,
3225    #[doc = "Coaxial helicopter"]
3226    MAV_TYPE_COAXIAL = 3,
3227    #[doc = "Normal helicopter with tail rotor."]
3228    MAV_TYPE_HELICOPTER = 4,
3229    #[doc = "Ground installation"]
3230    MAV_TYPE_ANTENNA_TRACKER = 5,
3231    #[doc = "Operator control unit / ground control station"]
3232    MAV_TYPE_GCS = 6,
3233    #[doc = "Airship, controlled"]
3234    MAV_TYPE_AIRSHIP = 7,
3235    #[doc = "Free balloon, uncontrolled"]
3236    MAV_TYPE_FREE_BALLOON = 8,
3237    #[doc = "Rocket"]
3238    MAV_TYPE_ROCKET = 9,
3239    #[doc = "Ground rover"]
3240    MAV_TYPE_GROUND_ROVER = 10,
3241    #[doc = "Surface vessel, boat, ship"]
3242    MAV_TYPE_SURFACE_BOAT = 11,
3243    #[doc = "Submarine"]
3244    MAV_TYPE_SUBMARINE = 12,
3245    #[doc = "Hexarotor"]
3246    MAV_TYPE_HEXAROTOR = 13,
3247    #[doc = "Octorotor"]
3248    MAV_TYPE_OCTOROTOR = 14,
3249    #[doc = "Tricopter"]
3250    MAV_TYPE_TRICOPTER = 15,
3251    #[doc = "Flapping wing"]
3252    MAV_TYPE_FLAPPING_WING = 16,
3253    #[doc = "Kite"]
3254    MAV_TYPE_KITE = 17,
3255    #[doc = "Onboard companion controller"]
3256    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3257    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3258    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3259    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3260    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3261    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3262    MAV_TYPE_VTOL_TILTROTOR = 21,
3263    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3264    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3265    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3266    MAV_TYPE_VTOL_TAILSITTER = 23,
3267    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3268    MAV_TYPE_VTOL_TILTWING = 24,
3269    #[doc = "VTOL reserved 5"]
3270    MAV_TYPE_VTOL_RESERVED5 = 25,
3271    #[doc = "Gimbal"]
3272    MAV_TYPE_GIMBAL = 26,
3273    #[doc = "ADSB system"]
3274    MAV_TYPE_ADSB = 27,
3275    #[doc = "Steerable, nonrigid airfoil"]
3276    MAV_TYPE_PARAFOIL = 28,
3277    #[doc = "Dodecarotor"]
3278    MAV_TYPE_DODECAROTOR = 29,
3279    #[doc = "Camera"]
3280    MAV_TYPE_CAMERA = 30,
3281    #[doc = "Charging station"]
3282    MAV_TYPE_CHARGING_STATION = 31,
3283    #[doc = "FLARM collision avoidance system"]
3284    MAV_TYPE_FLARM = 32,
3285    #[doc = "Servo"]
3286    MAV_TYPE_SERVO = 33,
3287    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3288    MAV_TYPE_ODID = 34,
3289    #[doc = "Decarotor"]
3290    MAV_TYPE_DECAROTOR = 35,
3291    #[doc = "Battery"]
3292    MAV_TYPE_BATTERY = 36,
3293    #[doc = "Parachute"]
3294    MAV_TYPE_PARACHUTE = 37,
3295    #[doc = "Log"]
3296    MAV_TYPE_LOG = 38,
3297    #[doc = "OSD"]
3298    MAV_TYPE_OSD = 39,
3299    #[doc = "IMU"]
3300    MAV_TYPE_IMU = 40,
3301    #[doc = "GPS"]
3302    MAV_TYPE_GPS = 41,
3303    #[doc = "Winch"]
3304    MAV_TYPE_WINCH = 42,
3305    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3306    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3307    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3308    MAV_TYPE_ILLUMINATOR = 44,
3309    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3310    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3311}
3312impl MavType {
3313    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3314}
3315impl Default for MavType {
3316    fn default() -> Self {
3317        Self::DEFAULT
3318    }
3319}
3320bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
3321impl EstimatorStatusFlags {
3322    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
3323}
3324impl Default for EstimatorStatusFlags {
3325    fn default() -> Self {
3326        Self::DEFAULT
3327    }
3328}
3329#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3330#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3331#[cfg_attr(feature = "serde", serde(tag = "type"))]
3332#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3333#[repr(u32)]
3334#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
3335pub enum MavMountMode {
3336    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
3337    MAV_MOUNT_MODE_RETRACT = 0,
3338    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
3339    MAV_MOUNT_MODE_NEUTRAL = 1,
3340    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
3341    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
3342    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
3343    MAV_MOUNT_MODE_RC_TARGETING = 3,
3344    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
3345    MAV_MOUNT_MODE_GPS_POINT = 4,
3346    #[doc = "Gimbal tracks system with specified system ID"]
3347    MAV_MOUNT_MODE_SYSID_TARGET = 5,
3348    #[doc = "Gimbal tracks home position"]
3349    MAV_MOUNT_MODE_HOME_LOCATION = 6,
3350}
3351impl MavMountMode {
3352    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
3353}
3354impl Default for MavMountMode {
3355    fn default() -> Self {
3356        Self::DEFAULT
3357    }
3358}
3359#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3360#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3361#[cfg_attr(feature = "serde", serde(tag = "type"))]
3362#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3363#[repr(u32)]
3364pub enum MavOdidClassEu {
3365    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
3366    MAV_ODID_CLASS_EU_UNDECLARED = 0,
3367    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
3368    MAV_ODID_CLASS_EU_CLASS_0 = 1,
3369    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
3370    MAV_ODID_CLASS_EU_CLASS_1 = 2,
3371    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
3372    MAV_ODID_CLASS_EU_CLASS_2 = 3,
3373    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
3374    MAV_ODID_CLASS_EU_CLASS_3 = 4,
3375    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
3376    MAV_ODID_CLASS_EU_CLASS_4 = 5,
3377    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
3378    MAV_ODID_CLASS_EU_CLASS_5 = 6,
3379    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
3380    MAV_ODID_CLASS_EU_CLASS_6 = 7,
3381}
3382impl MavOdidClassEu {
3383    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
3384}
3385impl Default for MavOdidClassEu {
3386    fn default() -> Self {
3387        Self::DEFAULT
3388    }
3389}
3390#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3391#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3392#[cfg_attr(feature = "serde", serde(tag = "type"))]
3393#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3394#[repr(u32)]
3395#[doc = "Actions being taken to mitigate/prevent fence breach"]
3396pub enum FenceMitigate {
3397    #[doc = "Unknown"]
3398    FENCE_MITIGATE_UNKNOWN = 0,
3399    #[doc = "No actions being taken"]
3400    FENCE_MITIGATE_NONE = 1,
3401    #[doc = "Velocity limiting active to prevent breach"]
3402    FENCE_MITIGATE_VEL_LIMIT = 2,
3403}
3404impl FenceMitigate {
3405    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
3406}
3407impl Default for FenceMitigate {
3408    fn default() -> Self {
3409        Self::DEFAULT
3410    }
3411}
3412#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3413#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3414#[cfg_attr(feature = "serde", serde(tag = "type"))]
3415#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3416#[repr(u32)]
3417#[doc = "Result from PARAM_EXT_SET message."]
3418pub enum ParamAck {
3419    #[doc = "Parameter value ACCEPTED and SET"]
3420    PARAM_ACK_ACCEPTED = 0,
3421    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
3422    PARAM_ACK_VALUE_UNSUPPORTED = 1,
3423    #[doc = "Parameter failed to set"]
3424    PARAM_ACK_FAILED = 2,
3425    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
3426    PARAM_ACK_IN_PROGRESS = 3,
3427}
3428impl ParamAck {
3429    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
3430}
3431impl Default for ParamAck {
3432    fn default() -> Self {
3433        Self::DEFAULT
3434    }
3435}
3436#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3437#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3438#[cfg_attr(feature = "serde", serde(tag = "type"))]
3439#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3440#[repr(u32)]
3441#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
3442pub enum ActuatorConfiguration {
3443    #[doc = "Do nothing."]
3444    ACTUATOR_CONFIGURATION_NONE = 0,
3445    #[doc = "Command the actuator to beep now."]
3446    ACTUATOR_CONFIGURATION_BEEP = 1,
3447    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
3448    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
3449    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
3450    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
3451    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
3452    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
3453    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
3454    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
3455}
3456impl ActuatorConfiguration {
3457    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
3458}
3459impl Default for ActuatorConfiguration {
3460    fn default() -> Self {
3461        Self::DEFAULT
3462    }
3463}
3464#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3465#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3466#[cfg_attr(feature = "serde", serde(tag = "type"))]
3467#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3468#[repr(u32)]
3469#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
3470pub enum MavGoto {
3471    #[doc = "Hold at the current position."]
3472    MAV_GOTO_DO_HOLD = 0,
3473    #[doc = "Continue with the next item in mission execution."]
3474    MAV_GOTO_DO_CONTINUE = 1,
3475    #[doc = "Hold at the current position of the system"]
3476    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
3477    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
3478    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
3479}
3480impl MavGoto {
3481    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
3482}
3483impl Default for MavGoto {
3484    fn default() -> Self {
3485        Self::DEFAULT
3486    }
3487}
3488#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3489#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3490#[cfg_attr(feature = "serde", serde(tag = "type"))]
3491#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3492#[repr(u32)]
3493#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3494pub enum MavStandardMode {
3495    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3496    MAV_STANDARD_MODE_NON_STANDARD = 0,
3497    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3498    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3499    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3500    MAV_STANDARD_MODE_ORBIT = 2,
3501    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3502    MAV_STANDARD_MODE_CRUISE = 3,
3503    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3504    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3505    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3506    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3507    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3508    MAV_STANDARD_MODE_MISSION = 6,
3509    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3510    MAV_STANDARD_MODE_LAND = 7,
3511    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3512    MAV_STANDARD_MODE_TAKEOFF = 8,
3513}
3514impl MavStandardMode {
3515    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3516}
3517impl Default for MavStandardMode {
3518    fn default() -> Self {
3519        Self::DEFAULT
3520    }
3521}
3522#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3523#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3524#[cfg_attr(feature = "serde", serde(tag = "type"))]
3525#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3526#[repr(u32)]
3527#[doc = "Camera Modes."]
3528pub enum CameraMode {
3529    #[doc = "Camera is in image/photo capture mode."]
3530    CAMERA_MODE_IMAGE = 0,
3531    #[doc = "Camera is in video capture mode."]
3532    CAMERA_MODE_VIDEO = 1,
3533    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
3534    CAMERA_MODE_IMAGE_SURVEY = 2,
3535}
3536impl CameraMode {
3537    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
3538}
3539impl Default for CameraMode {
3540    fn default() -> Self {
3541        Self::DEFAULT
3542    }
3543}
3544#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3545#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3546#[cfg_attr(feature = "serde", serde(tag = "type"))]
3547#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3548#[repr(u32)]
3549pub enum MavOdidUaType {
3550    #[doc = "No UA (Unmanned Aircraft) type defined."]
3551    MAV_ODID_UA_TYPE_NONE = 0,
3552    #[doc = "Aeroplane/Airplane. Fixed wing."]
3553    MAV_ODID_UA_TYPE_AEROPLANE = 1,
3554    #[doc = "Helicopter or multirotor."]
3555    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
3556    #[doc = "Gyroplane."]
3557    MAV_ODID_UA_TYPE_GYROPLANE = 3,
3558    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
3559    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3560    #[doc = "Ornithopter."]
3561    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3562    #[doc = "Glider."]
3563    MAV_ODID_UA_TYPE_GLIDER = 6,
3564    #[doc = "Kite."]
3565    MAV_ODID_UA_TYPE_KITE = 7,
3566    #[doc = "Free Balloon."]
3567    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3568    #[doc = "Captive Balloon."]
3569    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3570    #[doc = "Airship. E.g. a blimp."]
3571    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3572    #[doc = "Free Fall/Parachute (unpowered)."]
3573    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3574    #[doc = "Rocket."]
3575    MAV_ODID_UA_TYPE_ROCKET = 12,
3576    #[doc = "Tethered powered aircraft."]
3577    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3578    #[doc = "Ground Obstacle."]
3579    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3580    #[doc = "Other type of aircraft not listed earlier."]
3581    MAV_ODID_UA_TYPE_OTHER = 15,
3582}
3583impl MavOdidUaType {
3584    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3585}
3586impl Default for MavOdidUaType {
3587    fn default() -> Self {
3588        Self::DEFAULT
3589    }
3590}
3591#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3592#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3593#[cfg_attr(feature = "serde", serde(tag = "type"))]
3594#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3595#[repr(u32)]
3596#[doc = "Type of GPS fix"]
3597pub enum GpsFixType {
3598    #[doc = "No GPS connected"]
3599    GPS_FIX_TYPE_NO_GPS = 0,
3600    #[doc = "No position information, GPS is connected"]
3601    GPS_FIX_TYPE_NO_FIX = 1,
3602    #[doc = "2D position"]
3603    GPS_FIX_TYPE_2D_FIX = 2,
3604    #[doc = "3D position"]
3605    GPS_FIX_TYPE_3D_FIX = 3,
3606    #[doc = "DGPS/SBAS aided 3D position"]
3607    GPS_FIX_TYPE_DGPS = 4,
3608    #[doc = "RTK float, 3D position"]
3609    GPS_FIX_TYPE_RTK_FLOAT = 5,
3610    #[doc = "RTK Fixed, 3D position"]
3611    GPS_FIX_TYPE_RTK_FIXED = 6,
3612    #[doc = "Static fixed, typically used for base stations"]
3613    GPS_FIX_TYPE_STATIC = 7,
3614    #[doc = "PPP, 3D position."]
3615    GPS_FIX_TYPE_PPP = 8,
3616}
3617impl GpsFixType {
3618    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
3619}
3620impl Default for GpsFixType {
3621    fn default() -> Self {
3622        Self::DEFAULT
3623    }
3624}
3625#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3626#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3627#[cfg_attr(feature = "serde", serde(tag = "type"))]
3628#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3629#[repr(u32)]
3630#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
3631pub enum MavFuelType {
3632    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
3633    MAV_FUEL_TYPE_UNKNOWN = 0,
3634    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
3635    MAV_FUEL_TYPE_LIQUID = 1,
3636    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
3637    MAV_FUEL_TYPE_GAS = 2,
3638}
3639impl MavFuelType {
3640    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
3641}
3642impl Default for MavFuelType {
3643    fn default() -> Self {
3644        Self::DEFAULT
3645    }
3646}
3647#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3648#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3649#[cfg_attr(feature = "serde", serde(tag = "type"))]
3650#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3651#[repr(u32)]
3652#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
3653pub enum TuneFormat {
3654    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
3655    TUNE_FORMAT_QBASIC1_1 = 1,
3656    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
3657    TUNE_FORMAT_MML_MODERN = 2,
3658}
3659impl TuneFormat {
3660    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
3661}
3662impl Default for TuneFormat {
3663    fn default() -> Self {
3664        Self::DEFAULT
3665    }
3666}
3667bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
3668impl CameraCapFlags {
3669    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
3670}
3671impl Default for CameraCapFlags {
3672    fn default() -> Self {
3673        Self::DEFAULT
3674    }
3675}
3676#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3677#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3678#[cfg_attr(feature = "serde", serde(tag = "type"))]
3679#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3680#[repr(u32)]
3681#[doc = "Enumeration of battery functions"]
3682pub enum MavBatteryFunction {
3683    #[doc = "Battery function is unknown"]
3684    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
3685    #[doc = "Battery supports all flight systems"]
3686    MAV_BATTERY_FUNCTION_ALL = 1,
3687    #[doc = "Battery for the propulsion system"]
3688    MAV_BATTERY_FUNCTION_PROPULSION = 2,
3689    #[doc = "Avionics battery"]
3690    MAV_BATTERY_FUNCTION_AVIONICS = 3,
3691    #[doc = "Payload battery"]
3692    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
3693}
3694impl MavBatteryFunction {
3695    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
3696}
3697impl Default for MavBatteryFunction {
3698    fn default() -> Self {
3699        Self::DEFAULT
3700    }
3701}
3702bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
3703impl HilSensorUpdatedFlags {
3704    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
3705}
3706impl Default for HilSensorUpdatedFlags {
3707    fn default() -> Self {
3708        Self::DEFAULT
3709    }
3710}
3711#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3712#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3713#[cfg_attr(feature = "serde", serde(tag = "type"))]
3714#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3715#[repr(u32)]
3716#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
3717pub enum RcSubType {
3718    #[doc = "Spektrum DSM2"]
3719    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
3720    #[doc = "Spektrum DSMX"]
3721    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
3722    #[doc = "Spektrum DSMX8"]
3723    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
3724}
3725impl RcSubType {
3726    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
3727}
3728impl Default for RcSubType {
3729    fn default() -> Self {
3730        Self::DEFAULT
3731    }
3732}
3733#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3734#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3735#[cfg_attr(feature = "serde", serde(tag = "type"))]
3736#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3737#[repr(u32)]
3738pub enum MavOdidDescType {
3739    #[doc = "Optional free-form text description of the purpose of the flight."]
3740    MAV_ODID_DESC_TYPE_TEXT = 0,
3741    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
3742    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
3743    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
3744    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
3745}
3746impl MavOdidDescType {
3747    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
3748}
3749impl Default for MavOdidDescType {
3750    fn default() -> Self {
3751        Self::DEFAULT
3752    }
3753}
3754#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3755#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3756#[cfg_attr(feature = "serde", serde(tag = "type"))]
3757#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3758#[repr(u32)]
3759pub enum MavTunnelPayloadType {
3760    #[doc = "Encoding of payload unknown."]
3761    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3762    #[doc = "Registered for STorM32 gimbal controller."]
3763    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3764    #[doc = "Registered for STorM32 gimbal controller."]
3765    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3766    #[doc = "Registered for STorM32 gimbal controller."]
3767    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3768    #[doc = "Registered for STorM32 gimbal controller."]
3769    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3770    #[doc = "Registered for STorM32 gimbal controller."]
3771    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3772    #[doc = "Registered for STorM32 gimbal controller."]
3773    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3774    #[doc = "Registered for STorM32 gimbal controller."]
3775    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3776    #[doc = "Registered for STorM32 gimbal controller."]
3777    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3778    #[doc = "Registered for STorM32 gimbal controller."]
3779    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3780    #[doc = "Registered for STorM32 gimbal controller."]
3781    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3782    #[doc = "Registered for ModalAI remote OSD protocol."]
3783    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3784    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3785    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3786    #[doc = "Registered for ModalAI vendor use."]
3787    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3788}
3789impl MavTunnelPayloadType {
3790    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3791}
3792impl Default for MavTunnelPayloadType {
3793    fn default() -> Self {
3794        Self::DEFAULT
3795    }
3796}
3797#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3798#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3799#[cfg_attr(feature = "serde", serde(tag = "type"))]
3800#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3801#[repr(u32)]
3802#[doc = "Type of mission items being requested/sent in mission protocol."]
3803pub enum MavMissionType {
3804    #[doc = "Items are mission commands for main mission."]
3805    MAV_MISSION_TYPE_MISSION = 0,
3806    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
3807    MAV_MISSION_TYPE_FENCE = 1,
3808    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
3809    MAV_MISSION_TYPE_RALLY = 2,
3810    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
3811    MAV_MISSION_TYPE_ALL = 255,
3812}
3813impl MavMissionType {
3814    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
3815}
3816impl Default for MavMissionType {
3817    fn default() -> Self {
3818        Self::DEFAULT
3819    }
3820}
3821#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3822#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3823#[cfg_attr(feature = "serde", serde(tag = "type"))]
3824#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3825#[repr(u32)]
3826pub enum MagCalStatus {
3827    MAG_CAL_NOT_STARTED = 0,
3828    MAG_CAL_WAITING_TO_START = 1,
3829    MAG_CAL_RUNNING_STEP_ONE = 2,
3830    MAG_CAL_RUNNING_STEP_TWO = 3,
3831    MAG_CAL_SUCCESS = 4,
3832    MAG_CAL_FAILED = 5,
3833    MAG_CAL_BAD_ORIENTATION = 6,
3834    MAG_CAL_BAD_RADIUS = 7,
3835}
3836impl MagCalStatus {
3837    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
3838}
3839impl Default for MagCalStatus {
3840    fn default() -> Self {
3841        Self::DEFAULT
3842    }
3843}
3844#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3845#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3846#[cfg_attr(feature = "serde", serde(tag = "type"))]
3847#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3848#[repr(u32)]
3849#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
3850pub enum MavFtpErr {
3851    #[doc = "None: No error"]
3852    MAV_FTP_ERR_NONE = 0,
3853    #[doc = "Fail: Unknown failure"]
3854    MAV_FTP_ERR_FAIL = 1,
3855    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
3856    MAV_FTP_ERR_FAILERRNO = 2,
3857    #[doc = "InvalidDataSize: Payload size is invalid"]
3858    MAV_FTP_ERR_INVALIDDATASIZE = 3,
3859    #[doc = "InvalidSession: Session is not currently open"]
3860    MAV_FTP_ERR_INVALIDSESSION = 4,
3861    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
3862    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
3863    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
3864    MAV_FTP_ERR_EOF = 6,
3865    #[doc = "UnknownCommand: Unknown command / opcode"]
3866    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
3867    #[doc = "FileExists: File/directory already exists"]
3868    MAV_FTP_ERR_FILEEXISTS = 8,
3869    #[doc = "FileProtected: File/directory is write protected"]
3870    MAV_FTP_ERR_FILEPROTECTED = 9,
3871    #[doc = "FileNotFound: File/directory not found"]
3872    MAV_FTP_ERR_FILENOTFOUND = 10,
3873}
3874impl MavFtpErr {
3875    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
3876}
3877impl Default for MavFtpErr {
3878    fn default() -> Self {
3879        Self::DEFAULT
3880    }
3881}
3882#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3883#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3884#[cfg_attr(feature = "serde", serde(tag = "type"))]
3885#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3886#[repr(u32)]
3887#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
3888pub enum MavFtpOpcode {
3889    #[doc = "None. Ignored, always ACKed"]
3890    MAV_FTP_OPCODE_NONE = 0,
3891    #[doc = "TerminateSession: Terminates open Read session"]
3892    MAV_FTP_OPCODE_TERMINATESESSION = 1,
3893    #[doc = "ResetSessions: Terminates all open read sessions"]
3894    MAV_FTP_OPCODE_RESETSESSION = 2,
3895    #[doc = "ListDirectory. List files and directories in path from offset"]
3896    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
3897    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
3898    MAV_FTP_OPCODE_OPENFILERO = 4,
3899    #[doc = "ReadFile: Reads size bytes from offset in session"]
3900    MAV_FTP_OPCODE_READFILE = 5,
3901    #[doc = "CreateFile: Creates file at path for writing, returns session"]
3902    MAV_FTP_OPCODE_CREATEFILE = 6,
3903    #[doc = "WriteFile: Writes size bytes to offset in session"]
3904    MAV_FTP_OPCODE_WRITEFILE = 7,
3905    #[doc = "RemoveFile: Remove file at path"]
3906    MAV_FTP_OPCODE_REMOVEFILE = 8,
3907    #[doc = "CreateDirectory: Creates directory at path"]
3908    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
3909    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
3910    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
3911    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
3912    MAV_FTP_OPCODE_OPENFILEWO = 11,
3913    #[doc = "TruncateFile: Truncate file at path to offset length"]
3914    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
3915    #[doc = "Rename: Rename path1 to path2"]
3916    MAV_FTP_OPCODE_RENAME = 13,
3917    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
3918    MAV_FTP_OPCODE_CALCFILECRC = 14,
3919    #[doc = "BurstReadFile: Burst download session file"]
3920    MAV_FTP_OPCODE_BURSTREADFILE = 15,
3921    #[doc = "ACK: ACK response"]
3922    MAV_FTP_OPCODE_ACK = 128,
3923    #[doc = "NAK: NAK response"]
3924    MAV_FTP_OPCODE_NAK = 129,
3925}
3926impl MavFtpOpcode {
3927    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
3928}
3929impl Default for MavFtpOpcode {
3930    fn default() -> Self {
3931        Self::DEFAULT
3932    }
3933}
3934#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3935#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3936#[cfg_attr(feature = "serde", serde(tag = "type"))]
3937#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3938#[repr(u32)]
3939#[doc = "Enumeration of VTOL states"]
3940pub enum MavVtolState {
3941    #[doc = "MAV is not configured as VTOL"]
3942    MAV_VTOL_STATE_UNDEFINED = 0,
3943    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3944    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3945    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3946    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3947    #[doc = "VTOL is in multicopter state"]
3948    MAV_VTOL_STATE_MC = 3,
3949    #[doc = "VTOL is in fixed-wing state"]
3950    MAV_VTOL_STATE_FW = 4,
3951}
3952impl MavVtolState {
3953    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3954}
3955impl Default for MavVtolState {
3956    fn default() -> Self {
3957        Self::DEFAULT
3958    }
3959}
3960#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3961#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3962#[cfg_attr(feature = "serde", serde(tag = "type"))]
3963#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3964#[repr(u32)]
3965#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
3966pub enum CameraSource {
3967    #[doc = "Default camera source."]
3968    CAMERA_SOURCE_DEFAULT = 0,
3969    #[doc = "RGB camera source."]
3970    CAMERA_SOURCE_RGB = 1,
3971    #[doc = "IR camera source."]
3972    CAMERA_SOURCE_IR = 2,
3973    #[doc = "NDVI camera source."]
3974    CAMERA_SOURCE_NDVI = 3,
3975}
3976impl CameraSource {
3977    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
3978}
3979impl Default for CameraSource {
3980    fn default() -> Self {
3981        Self::DEFAULT
3982    }
3983}
3984#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3985#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3986#[cfg_attr(feature = "serde", serde(tag = "type"))]
3987#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3988#[repr(u32)]
3989#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
3990pub enum MavBatteryMode {
3991    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
3992    MAV_BATTERY_MODE_UNKNOWN = 0,
3993    #[doc = "Battery is auto discharging (towards storage level)."]
3994    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
3995    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
3996    MAV_BATTERY_MODE_HOT_SWAP = 2,
3997}
3998impl MavBatteryMode {
3999    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
4000}
4001impl Default for MavBatteryMode {
4002    fn default() -> Self {
4003        Self::DEFAULT
4004    }
4005}
4006bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
4007impl AdsbFlags {
4008    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
4009}
4010impl Default for AdsbFlags {
4011    fn default() -> Self {
4012        Self::DEFAULT
4013    }
4014}
4015#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4016#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4017#[cfg_attr(feature = "serde", serde(tag = "type"))]
4018#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4019#[repr(u32)]
4020#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
4021pub enum MotorTestThrottleType {
4022    #[doc = "Throttle as a percentage (0 ~ 100)"]
4023    MOTOR_TEST_THROTTLE_PERCENT = 0,
4024    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
4025    MOTOR_TEST_THROTTLE_PWM = 1,
4026    #[doc = "Throttle pass-through from pilot's transmitter."]
4027    MOTOR_TEST_THROTTLE_PILOT = 2,
4028    #[doc = "Per-motor compass calibration test."]
4029    MOTOR_TEST_COMPASS_CAL = 3,
4030}
4031impl MotorTestThrottleType {
4032    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
4033}
4034impl Default for MotorTestThrottleType {
4035    fn default() -> Self {
4036        Self::DEFAULT
4037    }
4038}
4039#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4040#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4041#[cfg_attr(feature = "serde", serde(tag = "type"))]
4042#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4043#[repr(u32)]
4044#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4045pub enum PreflightStorageMissionAction {
4046    #[doc = "Read current mission data from persistent storage"]
4047    MISSION_READ_PERSISTENT = 0,
4048    #[doc = "Write current mission data to persistent storage"]
4049    MISSION_WRITE_PERSISTENT = 1,
4050    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
4051    MISSION_RESET_DEFAULT = 2,
4052}
4053impl PreflightStorageMissionAction {
4054    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
4055}
4056impl Default for PreflightStorageMissionAction {
4057    fn default() -> Self {
4058        Self::DEFAULT
4059    }
4060}
4061#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4062#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4063#[cfg_attr(feature = "serde", serde(tag = "type"))]
4064#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4065#[repr(u32)]
4066#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
4067pub enum AisType {
4068    #[doc = "Not available (default)."]
4069    AIS_TYPE_UNKNOWN = 0,
4070    AIS_TYPE_RESERVED_1 = 1,
4071    AIS_TYPE_RESERVED_2 = 2,
4072    AIS_TYPE_RESERVED_3 = 3,
4073    AIS_TYPE_RESERVED_4 = 4,
4074    AIS_TYPE_RESERVED_5 = 5,
4075    AIS_TYPE_RESERVED_6 = 6,
4076    AIS_TYPE_RESERVED_7 = 7,
4077    AIS_TYPE_RESERVED_8 = 8,
4078    AIS_TYPE_RESERVED_9 = 9,
4079    AIS_TYPE_RESERVED_10 = 10,
4080    AIS_TYPE_RESERVED_11 = 11,
4081    AIS_TYPE_RESERVED_12 = 12,
4082    AIS_TYPE_RESERVED_13 = 13,
4083    AIS_TYPE_RESERVED_14 = 14,
4084    AIS_TYPE_RESERVED_15 = 15,
4085    AIS_TYPE_RESERVED_16 = 16,
4086    AIS_TYPE_RESERVED_17 = 17,
4087    AIS_TYPE_RESERVED_18 = 18,
4088    AIS_TYPE_RESERVED_19 = 19,
4089    #[doc = "Wing In Ground effect."]
4090    AIS_TYPE_WIG = 20,
4091    AIS_TYPE_WIG_HAZARDOUS_A = 21,
4092    AIS_TYPE_WIG_HAZARDOUS_B = 22,
4093    AIS_TYPE_WIG_HAZARDOUS_C = 23,
4094    AIS_TYPE_WIG_HAZARDOUS_D = 24,
4095    AIS_TYPE_WIG_RESERVED_1 = 25,
4096    AIS_TYPE_WIG_RESERVED_2 = 26,
4097    AIS_TYPE_WIG_RESERVED_3 = 27,
4098    AIS_TYPE_WIG_RESERVED_4 = 28,
4099    AIS_TYPE_WIG_RESERVED_5 = 29,
4100    AIS_TYPE_FISHING = 30,
4101    AIS_TYPE_TOWING = 31,
4102    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
4103    AIS_TYPE_TOWING_LARGE = 32,
4104    #[doc = "Dredging or other underwater ops."]
4105    AIS_TYPE_DREDGING = 33,
4106    AIS_TYPE_DIVING = 34,
4107    AIS_TYPE_MILITARY = 35,
4108    AIS_TYPE_SAILING = 36,
4109    AIS_TYPE_PLEASURE = 37,
4110    AIS_TYPE_RESERVED_20 = 38,
4111    AIS_TYPE_RESERVED_21 = 39,
4112    #[doc = "High Speed Craft."]
4113    AIS_TYPE_HSC = 40,
4114    AIS_TYPE_HSC_HAZARDOUS_A = 41,
4115    AIS_TYPE_HSC_HAZARDOUS_B = 42,
4116    AIS_TYPE_HSC_HAZARDOUS_C = 43,
4117    AIS_TYPE_HSC_HAZARDOUS_D = 44,
4118    AIS_TYPE_HSC_RESERVED_1 = 45,
4119    AIS_TYPE_HSC_RESERVED_2 = 46,
4120    AIS_TYPE_HSC_RESERVED_3 = 47,
4121    AIS_TYPE_HSC_RESERVED_4 = 48,
4122    AIS_TYPE_HSC_UNKNOWN = 49,
4123    AIS_TYPE_PILOT = 50,
4124    #[doc = "Search And Rescue vessel."]
4125    AIS_TYPE_SAR = 51,
4126    AIS_TYPE_TUG = 52,
4127    AIS_TYPE_PORT_TENDER = 53,
4128    #[doc = "Anti-pollution equipment."]
4129    AIS_TYPE_ANTI_POLLUTION = 54,
4130    AIS_TYPE_LAW_ENFORCEMENT = 55,
4131    AIS_TYPE_SPARE_LOCAL_1 = 56,
4132    AIS_TYPE_SPARE_LOCAL_2 = 57,
4133    AIS_TYPE_MEDICAL_TRANSPORT = 58,
4134    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
4135    AIS_TYPE_NONECOMBATANT = 59,
4136    AIS_TYPE_PASSENGER = 60,
4137    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
4138    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
4139    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
4140    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
4141    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
4142    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
4143    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
4144    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
4145    AIS_TYPE_PASSENGER_UNKNOWN = 69,
4146    AIS_TYPE_CARGO = 70,
4147    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
4148    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
4149    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
4150    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
4151    AIS_TYPE_CARGO_RESERVED_1 = 75,
4152    AIS_TYPE_CARGO_RESERVED_2 = 76,
4153    AIS_TYPE_CARGO_RESERVED_3 = 77,
4154    AIS_TYPE_CARGO_RESERVED_4 = 78,
4155    AIS_TYPE_CARGO_UNKNOWN = 79,
4156    AIS_TYPE_TANKER = 80,
4157    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
4158    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
4159    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
4160    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
4161    AIS_TYPE_TANKER_RESERVED_1 = 85,
4162    AIS_TYPE_TANKER_RESERVED_2 = 86,
4163    AIS_TYPE_TANKER_RESERVED_3 = 87,
4164    AIS_TYPE_TANKER_RESERVED_4 = 88,
4165    AIS_TYPE_TANKER_UNKNOWN = 89,
4166    AIS_TYPE_OTHER = 90,
4167    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
4168    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
4169    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
4170    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
4171    AIS_TYPE_OTHER_RESERVED_1 = 95,
4172    AIS_TYPE_OTHER_RESERVED_2 = 96,
4173    AIS_TYPE_OTHER_RESERVED_3 = 97,
4174    AIS_TYPE_OTHER_RESERVED_4 = 98,
4175    AIS_TYPE_OTHER_UNKNOWN = 99,
4176}
4177impl AisType {
4178    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
4179}
4180impl Default for AisType {
4181    fn default() -> Self {
4182        Self::DEFAULT
4183    }
4184}
4185bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
4186impl IlluminatorErrorFlags {
4187    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
4188}
4189impl Default for IlluminatorErrorFlags {
4190    fn default() -> Self {
4191        Self::DEFAULT
4192    }
4193}
4194#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4195#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4196#[cfg_attr(feature = "serde", serde(tag = "type"))]
4197#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4198#[repr(u32)]
4199pub enum MavOdidVerAcc {
4200    #[doc = "The vertical accuracy is unknown."]
4201    MAV_ODID_VER_ACC_UNKNOWN = 0,
4202    #[doc = "The vertical accuracy is smaller than 150 meter."]
4203    MAV_ODID_VER_ACC_150_METER = 1,
4204    #[doc = "The vertical accuracy is smaller than 45 meter."]
4205    MAV_ODID_VER_ACC_45_METER = 2,
4206    #[doc = "The vertical accuracy is smaller than 25 meter."]
4207    MAV_ODID_VER_ACC_25_METER = 3,
4208    #[doc = "The vertical accuracy is smaller than 10 meter."]
4209    MAV_ODID_VER_ACC_10_METER = 4,
4210    #[doc = "The vertical accuracy is smaller than 3 meter."]
4211    MAV_ODID_VER_ACC_3_METER = 5,
4212    #[doc = "The vertical accuracy is smaller than 1 meter."]
4213    MAV_ODID_VER_ACC_1_METER = 6,
4214}
4215impl MavOdidVerAcc {
4216    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
4217}
4218impl Default for MavOdidVerAcc {
4219    fn default() -> Self {
4220        Self::DEFAULT
4221    }
4222}
4223bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
4224impl AisFlags {
4225    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
4226}
4227impl Default for AisFlags {
4228    fn default() -> Self {
4229        Self::DEFAULT
4230    }
4231}
4232#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4233#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4234#[cfg_attr(feature = "serde", serde(tag = "type"))]
4235#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4236#[repr(u32)]
4237#[doc = "Result from a MAVLink command (MAV_CMD)"]
4238pub enum MavResult {
4239    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
4240    MAV_RESULT_ACCEPTED = 0,
4241    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
4242    MAV_RESULT_TEMPORARILY_REJECTED = 1,
4243    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
4244    MAV_RESULT_DENIED = 2,
4245    #[doc = "Command is not supported (unknown)."]
4246    MAV_RESULT_UNSUPPORTED = 3,
4247    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
4248    MAV_RESULT_FAILED = 4,
4249    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
4250    MAV_RESULT_IN_PROGRESS = 5,
4251    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
4252    MAV_RESULT_CANCELLED = 6,
4253    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
4254    MAV_RESULT_COMMAND_LONG_ONLY = 7,
4255    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
4256    MAV_RESULT_COMMAND_INT_ONLY = 8,
4257    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
4258    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
4259}
4260impl MavResult {
4261    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
4262}
4263impl Default for MavResult {
4264    fn default() -> Self {
4265        Self::DEFAULT
4266    }
4267}
4268#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4269#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4270#[cfg_attr(feature = "serde", serde(tag = "type"))]
4271#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4272#[repr(u32)]
4273#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
4274pub enum RcType {
4275    #[doc = "Spektrum"]
4276    RC_TYPE_SPEKTRUM = 0,
4277    #[doc = "CRSF"]
4278    RC_TYPE_CRSF = 1,
4279}
4280impl RcType {
4281    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
4282}
4283impl Default for RcType {
4284    fn default() -> Self {
4285        Self::DEFAULT
4286    }
4287}
4288bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
4289impl GimbalDeviceFlags {
4290    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
4291}
4292impl Default for GimbalDeviceFlags {
4293    fn default() -> Self {
4294        Self::DEFAULT
4295    }
4296}
4297#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4298#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4299#[cfg_attr(feature = "serde", serde(tag = "type"))]
4300#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4301#[repr(u32)]
4302#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
4303pub enum AdsbEmitterType {
4304    ADSB_EMITTER_TYPE_NO_INFO = 0,
4305    ADSB_EMITTER_TYPE_LIGHT = 1,
4306    ADSB_EMITTER_TYPE_SMALL = 2,
4307    ADSB_EMITTER_TYPE_LARGE = 3,
4308    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
4309    ADSB_EMITTER_TYPE_HEAVY = 5,
4310    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
4311    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
4312    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
4313    ADSB_EMITTER_TYPE_GLIDER = 9,
4314    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
4315    ADSB_EMITTER_TYPE_PARACHUTE = 11,
4316    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
4317    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
4318    ADSB_EMITTER_TYPE_UAV = 14,
4319    ADSB_EMITTER_TYPE_SPACE = 15,
4320    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
4321    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
4322    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
4323    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
4324}
4325impl AdsbEmitterType {
4326    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
4327}
4328impl Default for AdsbEmitterType {
4329    fn default() -> Self {
4330        Self::DEFAULT
4331    }
4332}
4333#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4334#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4335#[cfg_attr(feature = "serde", serde(tag = "type"))]
4336#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4337#[repr(u32)]
4338#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
4339pub enum CameraZoomType {
4340    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
4341    ZOOM_TYPE_STEP = 0,
4342    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
4343    ZOOM_TYPE_CONTINUOUS = 1,
4344    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
4345    ZOOM_TYPE_RANGE = 2,
4346    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
4347    ZOOM_TYPE_FOCAL_LENGTH = 3,
4348    #[doc = "Zoom value as horizontal field of view in degrees."]
4349    ZOOM_TYPE_HORIZONTAL_FOV = 4,
4350}
4351impl CameraZoomType {
4352    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
4353}
4354impl Default for CameraZoomType {
4355    fn default() -> Self {
4356        Self::DEFAULT
4357    }
4358}
4359bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4360impl StorageUsageFlag {
4361    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4362}
4363impl Default for StorageUsageFlag {
4364    fn default() -> Self {
4365        Self::DEFAULT
4366    }
4367}
4368#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4369#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4370#[cfg_attr(feature = "serde", serde(tag = "type"))]
4371#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4372#[repr(u32)]
4373#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
4374pub enum MavModeFlagDecodePosition {
4375    #[doc = "First bit:  10000000"]
4376    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
4377    #[doc = "Second bit: 01000000"]
4378    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
4379    #[doc = "Third bit:  00100000"]
4380    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
4381    #[doc = "Fourth bit: 00010000"]
4382    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
4383    #[doc = "Fifth bit:  00001000"]
4384    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
4385    #[doc = "Sixth bit:   00000100"]
4386    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
4387    #[doc = "Seventh bit: 00000010"]
4388    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
4389    #[doc = "Eighth bit: 00000001"]
4390    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
4391}
4392impl MavModeFlagDecodePosition {
4393    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
4394}
4395impl Default for MavModeFlagDecodePosition {
4396    fn default() -> Self {
4397        Self::DEFAULT
4398    }
4399}
4400#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4401#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4402#[cfg_attr(feature = "serde", serde(tag = "type"))]
4403#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4404#[repr(u32)]
4405#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
4406pub enum MotorTestOrder {
4407    #[doc = "Default autopilot motor test method."]
4408    MOTOR_TEST_ORDER_DEFAULT = 0,
4409    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
4410    MOTOR_TEST_ORDER_SEQUENCE = 1,
4411    #[doc = "Motor numbers are specified as the output as labeled on the board."]
4412    MOTOR_TEST_ORDER_BOARD = 2,
4413}
4414impl MotorTestOrder {
4415    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
4416}
4417impl Default for MotorTestOrder {
4418    fn default() -> Self {
4419        Self::DEFAULT
4420    }
4421}
4422#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4423#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4424#[cfg_attr(feature = "serde", serde(tag = "type"))]
4425#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4426#[repr(u32)]
4427#[doc = "Type of landing target"]
4428pub enum LandingTargetType {
4429    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
4430    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
4431    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
4432    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
4433    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
4434    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
4435    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
4436    LANDING_TARGET_TYPE_VISION_OTHER = 3,
4437}
4438impl LandingTargetType {
4439    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
4440}
4441impl Default for LandingTargetType {
4442    fn default() -> Self {
4443        Self::DEFAULT
4444    }
4445}
4446#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4448#[cfg_attr(feature = "serde", serde(tag = "type"))]
4449#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4450#[repr(u32)]
4451#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
4452pub enum MissionState {
4453    #[doc = "The mission status reporting is not supported."]
4454    MISSION_STATE_UNKNOWN = 0,
4455    #[doc = "No mission on the vehicle."]
4456    MISSION_STATE_NO_MISSION = 1,
4457    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
4458    MISSION_STATE_NOT_STARTED = 2,
4459    #[doc = "Mission is active, and will execute mission items when in auto mode."]
4460    MISSION_STATE_ACTIVE = 3,
4461    #[doc = "Mission is paused when in auto mode."]
4462    MISSION_STATE_PAUSED = 4,
4463    #[doc = "Mission has executed all mission items."]
4464    MISSION_STATE_COMPLETE = 5,
4465}
4466impl MissionState {
4467    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
4468}
4469impl Default for MissionState {
4470    fn default() -> Self {
4471        Self::DEFAULT
4472    }
4473}
4474bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
4475impl MavSysStatusSensor {
4476    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
4477}
4478impl Default for MavSysStatusSensor {
4479    fn default() -> Self {
4480        Self::DEFAULT
4481    }
4482}
4483#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4484#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4485#[cfg_attr(feature = "serde", serde(tag = "type"))]
4486#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4487#[repr(u32)]
4488#[doc = "Source of information about this collision."]
4489pub enum MavCollisionSrc {
4490    #[doc = "ID field references ADSB_VEHICLE packets"]
4491    MAV_COLLISION_SRC_ADSB = 0,
4492    #[doc = "ID field references MAVLink SRC ID"]
4493    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
4494}
4495impl MavCollisionSrc {
4496    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
4497}
4498impl Default for MavCollisionSrc {
4499    fn default() -> Self {
4500        Self::DEFAULT
4501    }
4502}
4503#[doc = "id: 75"]
4504#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
4505#[derive(Debug, Clone, PartialEq)]
4506#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4507#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4508pub struct COMMAND_INT_DATA {
4509    #[doc = "PARAM1, see MAV_CMD enum"]
4510    pub param1: f32,
4511    #[doc = "PARAM2, see MAV_CMD enum"]
4512    pub param2: f32,
4513    #[doc = "PARAM3, see MAV_CMD enum"]
4514    pub param3: f32,
4515    #[doc = "PARAM4, see MAV_CMD enum"]
4516    pub param4: f32,
4517    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
4518    pub x: i32,
4519    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
4520    pub y: i32,
4521    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
4522    pub z: f32,
4523    #[doc = "The scheduled action for the mission item."]
4524    pub command: MavCmd,
4525    #[doc = "System ID"]
4526    pub target_system: u8,
4527    #[doc = "Component ID"]
4528    pub target_component: u8,
4529    #[doc = "The coordinate system of the COMMAND."]
4530    pub frame: MavFrame,
4531    #[doc = "Not used."]
4532    pub current: u8,
4533    #[doc = "Not used (set 0)."]
4534    pub autocontinue: u8,
4535}
4536impl COMMAND_INT_DATA {
4537    pub const ENCODED_LEN: usize = 35usize;
4538    pub const DEFAULT: Self = Self {
4539        param1: 0.0_f32,
4540        param2: 0.0_f32,
4541        param3: 0.0_f32,
4542        param4: 0.0_f32,
4543        x: 0_i32,
4544        y: 0_i32,
4545        z: 0.0_f32,
4546        command: MavCmd::DEFAULT,
4547        target_system: 0_u8,
4548        target_component: 0_u8,
4549        frame: MavFrame::DEFAULT,
4550        current: 0_u8,
4551        autocontinue: 0_u8,
4552    };
4553    #[cfg(feature = "arbitrary")]
4554    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4555        use arbitrary::{Arbitrary, Unstructured};
4556        let mut buf = [0u8; 1024];
4557        rng.fill_bytes(&mut buf);
4558        let mut unstructured = Unstructured::new(&buf);
4559        Self::arbitrary(&mut unstructured).unwrap_or_default()
4560    }
4561}
4562impl Default for COMMAND_INT_DATA {
4563    fn default() -> Self {
4564        Self::DEFAULT.clone()
4565    }
4566}
4567impl MessageData for COMMAND_INT_DATA {
4568    type Message = MavMessage;
4569    const ID: u32 = 75u32;
4570    const NAME: &'static str = "COMMAND_INT";
4571    const EXTRA_CRC: u8 = 158u8;
4572    const ENCODED_LEN: usize = 35usize;
4573    fn deser(
4574        _version: MavlinkVersion,
4575        __input: &[u8],
4576    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4577        let avail_len = __input.len();
4578        let mut payload_buf = [0; Self::ENCODED_LEN];
4579        let mut buf = if avail_len < Self::ENCODED_LEN {
4580            payload_buf[0..avail_len].copy_from_slice(__input);
4581            Bytes::new(&payload_buf)
4582        } else {
4583            Bytes::new(__input)
4584        };
4585        let mut __struct = Self::default();
4586        __struct.param1 = buf.get_f32_le();
4587        __struct.param2 = buf.get_f32_le();
4588        __struct.param3 = buf.get_f32_le();
4589        __struct.param4 = buf.get_f32_le();
4590        __struct.x = buf.get_i32_le();
4591        __struct.y = buf.get_i32_le();
4592        __struct.z = buf.get_f32_le();
4593        let tmp = buf.get_u16_le();
4594        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
4595            ::mavlink_core::error::ParserError::InvalidEnum {
4596                enum_type: "MavCmd",
4597                value: tmp as u32,
4598            },
4599        )?;
4600        __struct.target_system = buf.get_u8();
4601        __struct.target_component = buf.get_u8();
4602        let tmp = buf.get_u8();
4603        __struct.frame =
4604            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4605                enum_type: "MavFrame",
4606                value: tmp as u32,
4607            })?;
4608        __struct.current = buf.get_u8();
4609        __struct.autocontinue = buf.get_u8();
4610        Ok(__struct)
4611    }
4612    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4613        let mut __tmp = BytesMut::new(bytes);
4614        #[allow(clippy::absurd_extreme_comparisons)]
4615        #[allow(unused_comparisons)]
4616        if __tmp.remaining() < Self::ENCODED_LEN {
4617            panic!(
4618                "buffer is too small (need {} bytes, but got {})",
4619                Self::ENCODED_LEN,
4620                __tmp.remaining(),
4621            )
4622        }
4623        __tmp.put_f32_le(self.param1);
4624        __tmp.put_f32_le(self.param2);
4625        __tmp.put_f32_le(self.param3);
4626        __tmp.put_f32_le(self.param4);
4627        __tmp.put_i32_le(self.x);
4628        __tmp.put_i32_le(self.y);
4629        __tmp.put_f32_le(self.z);
4630        __tmp.put_u16_le(self.command as u16);
4631        __tmp.put_u8(self.target_system);
4632        __tmp.put_u8(self.target_component);
4633        __tmp.put_u8(self.frame as u8);
4634        __tmp.put_u8(self.current);
4635        __tmp.put_u8(self.autocontinue);
4636        if matches!(version, MavlinkVersion::V2) {
4637            let len = __tmp.len();
4638            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4639        } else {
4640            __tmp.len()
4641        }
4642    }
4643}
4644#[doc = "id: 31"]
4645#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
4646#[derive(Debug, Clone, PartialEq)]
4647#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4648#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4649pub struct ATTITUDE_QUATERNION_DATA {
4650    #[doc = "Timestamp (time since system boot)."]
4651    pub time_boot_ms: u32,
4652    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
4653    pub q1: f32,
4654    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
4655    pub q2: f32,
4656    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
4657    pub q3: f32,
4658    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
4659    pub q4: f32,
4660    #[doc = "Roll angular speed"]
4661    pub rollspeed: f32,
4662    #[doc = "Pitch angular speed"]
4663    pub pitchspeed: f32,
4664    #[doc = "Yaw angular speed"]
4665    pub yawspeed: f32,
4666    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
4667    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
4668    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4669    pub repr_offset_q: [f32; 4],
4670}
4671impl ATTITUDE_QUATERNION_DATA {
4672    pub const ENCODED_LEN: usize = 48usize;
4673    pub const DEFAULT: Self = Self {
4674        time_boot_ms: 0_u32,
4675        q1: 0.0_f32,
4676        q2: 0.0_f32,
4677        q3: 0.0_f32,
4678        q4: 0.0_f32,
4679        rollspeed: 0.0_f32,
4680        pitchspeed: 0.0_f32,
4681        yawspeed: 0.0_f32,
4682        repr_offset_q: [0.0_f32; 4usize],
4683    };
4684    #[cfg(feature = "arbitrary")]
4685    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4686        use arbitrary::{Arbitrary, Unstructured};
4687        let mut buf = [0u8; 1024];
4688        rng.fill_bytes(&mut buf);
4689        let mut unstructured = Unstructured::new(&buf);
4690        Self::arbitrary(&mut unstructured).unwrap_or_default()
4691    }
4692}
4693impl Default for ATTITUDE_QUATERNION_DATA {
4694    fn default() -> Self {
4695        Self::DEFAULT.clone()
4696    }
4697}
4698impl MessageData for ATTITUDE_QUATERNION_DATA {
4699    type Message = MavMessage;
4700    const ID: u32 = 31u32;
4701    const NAME: &'static str = "ATTITUDE_QUATERNION";
4702    const EXTRA_CRC: u8 = 246u8;
4703    const ENCODED_LEN: usize = 48usize;
4704    fn deser(
4705        _version: MavlinkVersion,
4706        __input: &[u8],
4707    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4708        let avail_len = __input.len();
4709        let mut payload_buf = [0; Self::ENCODED_LEN];
4710        let mut buf = if avail_len < Self::ENCODED_LEN {
4711            payload_buf[0..avail_len].copy_from_slice(__input);
4712            Bytes::new(&payload_buf)
4713        } else {
4714            Bytes::new(__input)
4715        };
4716        let mut __struct = Self::default();
4717        __struct.time_boot_ms = buf.get_u32_le();
4718        __struct.q1 = buf.get_f32_le();
4719        __struct.q2 = buf.get_f32_le();
4720        __struct.q3 = buf.get_f32_le();
4721        __struct.q4 = buf.get_f32_le();
4722        __struct.rollspeed = buf.get_f32_le();
4723        __struct.pitchspeed = buf.get_f32_le();
4724        __struct.yawspeed = buf.get_f32_le();
4725        for v in &mut __struct.repr_offset_q {
4726            let val = buf.get_f32_le();
4727            *v = val;
4728        }
4729        Ok(__struct)
4730    }
4731    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4732        let mut __tmp = BytesMut::new(bytes);
4733        #[allow(clippy::absurd_extreme_comparisons)]
4734        #[allow(unused_comparisons)]
4735        if __tmp.remaining() < Self::ENCODED_LEN {
4736            panic!(
4737                "buffer is too small (need {} bytes, but got {})",
4738                Self::ENCODED_LEN,
4739                __tmp.remaining(),
4740            )
4741        }
4742        __tmp.put_u32_le(self.time_boot_ms);
4743        __tmp.put_f32_le(self.q1);
4744        __tmp.put_f32_le(self.q2);
4745        __tmp.put_f32_le(self.q3);
4746        __tmp.put_f32_le(self.q4);
4747        __tmp.put_f32_le(self.rollspeed);
4748        __tmp.put_f32_le(self.pitchspeed);
4749        __tmp.put_f32_le(self.yawspeed);
4750        for val in &self.repr_offset_q {
4751            __tmp.put_f32_le(*val);
4752        }
4753        if matches!(version, MavlinkVersion::V2) {
4754            let len = __tmp.len();
4755            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4756        } else {
4757            __tmp.len()
4758        }
4759    }
4760}
4761#[doc = "id: 70"]
4762#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
4763#[derive(Debug, Clone, PartialEq)]
4764#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4765#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4766pub struct RC_CHANNELS_OVERRIDE_DATA {
4767    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
4768    pub chan1_raw: u16,
4769    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
4770    pub chan2_raw: u16,
4771    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
4772    pub chan3_raw: u16,
4773    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
4774    pub chan4_raw: u16,
4775    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
4776    pub chan5_raw: u16,
4777    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
4778    pub chan6_raw: u16,
4779    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
4780    pub chan7_raw: u16,
4781    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
4782    pub chan8_raw: u16,
4783    #[doc = "System ID"]
4784    pub target_system: u8,
4785    #[doc = "Component ID"]
4786    pub target_component: u8,
4787    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
4788    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
4789    pub chan9_raw: u16,
4790    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
4791    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
4792    pub chan10_raw: u16,
4793    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
4794    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
4795    pub chan11_raw: u16,
4796    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
4797    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
4798    pub chan12_raw: u16,
4799    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
4800    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
4801    pub chan13_raw: u16,
4802    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
4803    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
4804    pub chan14_raw: u16,
4805    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
4806    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
4807    pub chan15_raw: u16,
4808    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
4809    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
4810    pub chan16_raw: u16,
4811    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
4812    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
4813    pub chan17_raw: u16,
4814    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
4815    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
4816    pub chan18_raw: u16,
4817}
4818impl RC_CHANNELS_OVERRIDE_DATA {
4819    pub const ENCODED_LEN: usize = 38usize;
4820    pub const DEFAULT: Self = Self {
4821        chan1_raw: 0_u16,
4822        chan2_raw: 0_u16,
4823        chan3_raw: 0_u16,
4824        chan4_raw: 0_u16,
4825        chan5_raw: 0_u16,
4826        chan6_raw: 0_u16,
4827        chan7_raw: 0_u16,
4828        chan8_raw: 0_u16,
4829        target_system: 0_u8,
4830        target_component: 0_u8,
4831        chan9_raw: 0_u16,
4832        chan10_raw: 0_u16,
4833        chan11_raw: 0_u16,
4834        chan12_raw: 0_u16,
4835        chan13_raw: 0_u16,
4836        chan14_raw: 0_u16,
4837        chan15_raw: 0_u16,
4838        chan16_raw: 0_u16,
4839        chan17_raw: 0_u16,
4840        chan18_raw: 0_u16,
4841    };
4842    #[cfg(feature = "arbitrary")]
4843    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4844        use arbitrary::{Arbitrary, Unstructured};
4845        let mut buf = [0u8; 1024];
4846        rng.fill_bytes(&mut buf);
4847        let mut unstructured = Unstructured::new(&buf);
4848        Self::arbitrary(&mut unstructured).unwrap_or_default()
4849    }
4850}
4851impl Default for RC_CHANNELS_OVERRIDE_DATA {
4852    fn default() -> Self {
4853        Self::DEFAULT.clone()
4854    }
4855}
4856impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
4857    type Message = MavMessage;
4858    const ID: u32 = 70u32;
4859    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
4860    const EXTRA_CRC: u8 = 124u8;
4861    const ENCODED_LEN: usize = 38usize;
4862    fn deser(
4863        _version: MavlinkVersion,
4864        __input: &[u8],
4865    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4866        let avail_len = __input.len();
4867        let mut payload_buf = [0; Self::ENCODED_LEN];
4868        let mut buf = if avail_len < Self::ENCODED_LEN {
4869            payload_buf[0..avail_len].copy_from_slice(__input);
4870            Bytes::new(&payload_buf)
4871        } else {
4872            Bytes::new(__input)
4873        };
4874        let mut __struct = Self::default();
4875        __struct.chan1_raw = buf.get_u16_le();
4876        __struct.chan2_raw = buf.get_u16_le();
4877        __struct.chan3_raw = buf.get_u16_le();
4878        __struct.chan4_raw = buf.get_u16_le();
4879        __struct.chan5_raw = buf.get_u16_le();
4880        __struct.chan6_raw = buf.get_u16_le();
4881        __struct.chan7_raw = buf.get_u16_le();
4882        __struct.chan8_raw = buf.get_u16_le();
4883        __struct.target_system = buf.get_u8();
4884        __struct.target_component = buf.get_u8();
4885        __struct.chan9_raw = buf.get_u16_le();
4886        __struct.chan10_raw = buf.get_u16_le();
4887        __struct.chan11_raw = buf.get_u16_le();
4888        __struct.chan12_raw = buf.get_u16_le();
4889        __struct.chan13_raw = buf.get_u16_le();
4890        __struct.chan14_raw = buf.get_u16_le();
4891        __struct.chan15_raw = buf.get_u16_le();
4892        __struct.chan16_raw = buf.get_u16_le();
4893        __struct.chan17_raw = buf.get_u16_le();
4894        __struct.chan18_raw = buf.get_u16_le();
4895        Ok(__struct)
4896    }
4897    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4898        let mut __tmp = BytesMut::new(bytes);
4899        #[allow(clippy::absurd_extreme_comparisons)]
4900        #[allow(unused_comparisons)]
4901        if __tmp.remaining() < Self::ENCODED_LEN {
4902            panic!(
4903                "buffer is too small (need {} bytes, but got {})",
4904                Self::ENCODED_LEN,
4905                __tmp.remaining(),
4906            )
4907        }
4908        __tmp.put_u16_le(self.chan1_raw);
4909        __tmp.put_u16_le(self.chan2_raw);
4910        __tmp.put_u16_le(self.chan3_raw);
4911        __tmp.put_u16_le(self.chan4_raw);
4912        __tmp.put_u16_le(self.chan5_raw);
4913        __tmp.put_u16_le(self.chan6_raw);
4914        __tmp.put_u16_le(self.chan7_raw);
4915        __tmp.put_u16_le(self.chan8_raw);
4916        __tmp.put_u8(self.target_system);
4917        __tmp.put_u8(self.target_component);
4918        __tmp.put_u16_le(self.chan9_raw);
4919        __tmp.put_u16_le(self.chan10_raw);
4920        __tmp.put_u16_le(self.chan11_raw);
4921        __tmp.put_u16_le(self.chan12_raw);
4922        __tmp.put_u16_le(self.chan13_raw);
4923        __tmp.put_u16_le(self.chan14_raw);
4924        __tmp.put_u16_le(self.chan15_raw);
4925        __tmp.put_u16_le(self.chan16_raw);
4926        __tmp.put_u16_le(self.chan17_raw);
4927        __tmp.put_u16_le(self.chan18_raw);
4928        if matches!(version, MavlinkVersion::V2) {
4929            let len = __tmp.len();
4930            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4931        } else {
4932            __tmp.len()
4933        }
4934    }
4935}
4936#[doc = "id: 146"]
4937#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
4938#[derive(Debug, Clone, PartialEq)]
4939#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4940#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4941pub struct CONTROL_SYSTEM_STATE_DATA {
4942    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4943    pub time_usec: u64,
4944    #[doc = "X acceleration in body frame"]
4945    pub x_acc: f32,
4946    #[doc = "Y acceleration in body frame"]
4947    pub y_acc: f32,
4948    #[doc = "Z acceleration in body frame"]
4949    pub z_acc: f32,
4950    #[doc = "X velocity in body frame"]
4951    pub x_vel: f32,
4952    #[doc = "Y velocity in body frame"]
4953    pub y_vel: f32,
4954    #[doc = "Z velocity in body frame"]
4955    pub z_vel: f32,
4956    #[doc = "X position in local frame"]
4957    pub x_pos: f32,
4958    #[doc = "Y position in local frame"]
4959    pub y_pos: f32,
4960    #[doc = "Z position in local frame"]
4961    pub z_pos: f32,
4962    #[doc = "Airspeed, set to -1 if unknown"]
4963    pub airspeed: f32,
4964    #[doc = "Variance of body velocity estimate"]
4965    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4966    pub vel_variance: [f32; 3],
4967    #[doc = "Variance in local position"]
4968    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4969    pub pos_variance: [f32; 3],
4970    #[doc = "The attitude, represented as Quaternion"]
4971    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4972    pub q: [f32; 4],
4973    #[doc = "Angular rate in roll axis"]
4974    pub roll_rate: f32,
4975    #[doc = "Angular rate in pitch axis"]
4976    pub pitch_rate: f32,
4977    #[doc = "Angular rate in yaw axis"]
4978    pub yaw_rate: f32,
4979}
4980impl CONTROL_SYSTEM_STATE_DATA {
4981    pub const ENCODED_LEN: usize = 100usize;
4982    pub const DEFAULT: Self = Self {
4983        time_usec: 0_u64,
4984        x_acc: 0.0_f32,
4985        y_acc: 0.0_f32,
4986        z_acc: 0.0_f32,
4987        x_vel: 0.0_f32,
4988        y_vel: 0.0_f32,
4989        z_vel: 0.0_f32,
4990        x_pos: 0.0_f32,
4991        y_pos: 0.0_f32,
4992        z_pos: 0.0_f32,
4993        airspeed: 0.0_f32,
4994        vel_variance: [0.0_f32; 3usize],
4995        pos_variance: [0.0_f32; 3usize],
4996        q: [0.0_f32; 4usize],
4997        roll_rate: 0.0_f32,
4998        pitch_rate: 0.0_f32,
4999        yaw_rate: 0.0_f32,
5000    };
5001    #[cfg(feature = "arbitrary")]
5002    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5003        use arbitrary::{Arbitrary, Unstructured};
5004        let mut buf = [0u8; 1024];
5005        rng.fill_bytes(&mut buf);
5006        let mut unstructured = Unstructured::new(&buf);
5007        Self::arbitrary(&mut unstructured).unwrap_or_default()
5008    }
5009}
5010impl Default for CONTROL_SYSTEM_STATE_DATA {
5011    fn default() -> Self {
5012        Self::DEFAULT.clone()
5013    }
5014}
5015impl MessageData for CONTROL_SYSTEM_STATE_DATA {
5016    type Message = MavMessage;
5017    const ID: u32 = 146u32;
5018    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
5019    const EXTRA_CRC: u8 = 103u8;
5020    const ENCODED_LEN: usize = 100usize;
5021    fn deser(
5022        _version: MavlinkVersion,
5023        __input: &[u8],
5024    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5025        let avail_len = __input.len();
5026        let mut payload_buf = [0; Self::ENCODED_LEN];
5027        let mut buf = if avail_len < Self::ENCODED_LEN {
5028            payload_buf[0..avail_len].copy_from_slice(__input);
5029            Bytes::new(&payload_buf)
5030        } else {
5031            Bytes::new(__input)
5032        };
5033        let mut __struct = Self::default();
5034        __struct.time_usec = buf.get_u64_le();
5035        __struct.x_acc = buf.get_f32_le();
5036        __struct.y_acc = buf.get_f32_le();
5037        __struct.z_acc = buf.get_f32_le();
5038        __struct.x_vel = buf.get_f32_le();
5039        __struct.y_vel = buf.get_f32_le();
5040        __struct.z_vel = buf.get_f32_le();
5041        __struct.x_pos = buf.get_f32_le();
5042        __struct.y_pos = buf.get_f32_le();
5043        __struct.z_pos = buf.get_f32_le();
5044        __struct.airspeed = buf.get_f32_le();
5045        for v in &mut __struct.vel_variance {
5046            let val = buf.get_f32_le();
5047            *v = val;
5048        }
5049        for v in &mut __struct.pos_variance {
5050            let val = buf.get_f32_le();
5051            *v = val;
5052        }
5053        for v in &mut __struct.q {
5054            let val = buf.get_f32_le();
5055            *v = val;
5056        }
5057        __struct.roll_rate = buf.get_f32_le();
5058        __struct.pitch_rate = buf.get_f32_le();
5059        __struct.yaw_rate = buf.get_f32_le();
5060        Ok(__struct)
5061    }
5062    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5063        let mut __tmp = BytesMut::new(bytes);
5064        #[allow(clippy::absurd_extreme_comparisons)]
5065        #[allow(unused_comparisons)]
5066        if __tmp.remaining() < Self::ENCODED_LEN {
5067            panic!(
5068                "buffer is too small (need {} bytes, but got {})",
5069                Self::ENCODED_LEN,
5070                __tmp.remaining(),
5071            )
5072        }
5073        __tmp.put_u64_le(self.time_usec);
5074        __tmp.put_f32_le(self.x_acc);
5075        __tmp.put_f32_le(self.y_acc);
5076        __tmp.put_f32_le(self.z_acc);
5077        __tmp.put_f32_le(self.x_vel);
5078        __tmp.put_f32_le(self.y_vel);
5079        __tmp.put_f32_le(self.z_vel);
5080        __tmp.put_f32_le(self.x_pos);
5081        __tmp.put_f32_le(self.y_pos);
5082        __tmp.put_f32_le(self.z_pos);
5083        __tmp.put_f32_le(self.airspeed);
5084        for val in &self.vel_variance {
5085            __tmp.put_f32_le(*val);
5086        }
5087        for val in &self.pos_variance {
5088            __tmp.put_f32_le(*val);
5089        }
5090        for val in &self.q {
5091            __tmp.put_f32_le(*val);
5092        }
5093        __tmp.put_f32_le(self.roll_rate);
5094        __tmp.put_f32_le(self.pitch_rate);
5095        __tmp.put_f32_le(self.yaw_rate);
5096        if matches!(version, MavlinkVersion::V2) {
5097            let len = __tmp.len();
5098            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5099        } else {
5100            __tmp.len()
5101        }
5102    }
5103}
5104#[doc = "id: 5"]
5105#[doc = "Request to control this MAV."]
5106#[derive(Debug, Clone, PartialEq)]
5107#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5108#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5109pub struct CHANGE_OPERATOR_CONTROL_DATA {
5110    #[doc = "System the GCS requests control for"]
5111    pub target_system: u8,
5112    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
5113    pub control_request: u8,
5114    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
5115    pub version: u8,
5116    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
5117    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5118    pub passkey: [u8; 25],
5119}
5120impl CHANGE_OPERATOR_CONTROL_DATA {
5121    pub const ENCODED_LEN: usize = 28usize;
5122    pub const DEFAULT: Self = Self {
5123        target_system: 0_u8,
5124        control_request: 0_u8,
5125        version: 0_u8,
5126        passkey: [0_u8; 25usize],
5127    };
5128    #[cfg(feature = "arbitrary")]
5129    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5130        use arbitrary::{Arbitrary, Unstructured};
5131        let mut buf = [0u8; 1024];
5132        rng.fill_bytes(&mut buf);
5133        let mut unstructured = Unstructured::new(&buf);
5134        Self::arbitrary(&mut unstructured).unwrap_or_default()
5135    }
5136}
5137impl Default for CHANGE_OPERATOR_CONTROL_DATA {
5138    fn default() -> Self {
5139        Self::DEFAULT.clone()
5140    }
5141}
5142impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
5143    type Message = MavMessage;
5144    const ID: u32 = 5u32;
5145    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
5146    const EXTRA_CRC: u8 = 217u8;
5147    const ENCODED_LEN: usize = 28usize;
5148    fn deser(
5149        _version: MavlinkVersion,
5150        __input: &[u8],
5151    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5152        let avail_len = __input.len();
5153        let mut payload_buf = [0; Self::ENCODED_LEN];
5154        let mut buf = if avail_len < Self::ENCODED_LEN {
5155            payload_buf[0..avail_len].copy_from_slice(__input);
5156            Bytes::new(&payload_buf)
5157        } else {
5158            Bytes::new(__input)
5159        };
5160        let mut __struct = Self::default();
5161        __struct.target_system = buf.get_u8();
5162        __struct.control_request = buf.get_u8();
5163        __struct.version = buf.get_u8();
5164        for v in &mut __struct.passkey {
5165            let val = buf.get_u8();
5166            *v = val;
5167        }
5168        Ok(__struct)
5169    }
5170    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5171        let mut __tmp = BytesMut::new(bytes);
5172        #[allow(clippy::absurd_extreme_comparisons)]
5173        #[allow(unused_comparisons)]
5174        if __tmp.remaining() < Self::ENCODED_LEN {
5175            panic!(
5176                "buffer is too small (need {} bytes, but got {})",
5177                Self::ENCODED_LEN,
5178                __tmp.remaining(),
5179            )
5180        }
5181        __tmp.put_u8(self.target_system);
5182        __tmp.put_u8(self.control_request);
5183        __tmp.put_u8(self.version);
5184        for val in &self.passkey {
5185            __tmp.put_u8(*val);
5186        }
5187        if matches!(version, MavlinkVersion::V2) {
5188            let len = __tmp.len();
5189            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5190        } else {
5191            __tmp.len()
5192        }
5193    }
5194}
5195#[doc = "id: 301"]
5196#[doc = "The location and information of an AIS vessel."]
5197#[derive(Debug, Clone, PartialEq)]
5198#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5199#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5200pub struct AIS_VESSEL_DATA {
5201    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
5202    pub MMSI: u32,
5203    #[doc = "Latitude"]
5204    pub lat: i32,
5205    #[doc = "Longitude"]
5206    pub lon: i32,
5207    #[doc = "Course over ground"]
5208    pub COG: u16,
5209    #[doc = "True heading"]
5210    pub heading: u16,
5211    #[doc = "Speed over ground"]
5212    pub velocity: u16,
5213    #[doc = "Distance from lat/lon location to bow"]
5214    pub dimension_bow: u16,
5215    #[doc = "Distance from lat/lon location to stern"]
5216    pub dimension_stern: u16,
5217    #[doc = "Time since last communication in seconds"]
5218    pub tslc: u16,
5219    #[doc = "Bitmask to indicate various statuses including valid data fields"]
5220    pub flags: AisFlags,
5221    #[doc = "Turn rate"]
5222    pub turn_rate: i8,
5223    #[doc = "Navigational status"]
5224    pub navigational_status: AisNavStatus,
5225    #[doc = "Type of vessels"]
5226    pub mavtype: AisType,
5227    #[doc = "Distance from lat/lon location to port side"]
5228    pub dimension_port: u8,
5229    #[doc = "Distance from lat/lon location to starboard side"]
5230    pub dimension_starboard: u8,
5231    #[doc = "The vessel callsign"]
5232    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5233    pub callsign: [u8; 7],
5234    #[doc = "The vessel name"]
5235    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5236    pub name: [u8; 20],
5237}
5238impl AIS_VESSEL_DATA {
5239    pub const ENCODED_LEN: usize = 58usize;
5240    pub const DEFAULT: Self = Self {
5241        MMSI: 0_u32,
5242        lat: 0_i32,
5243        lon: 0_i32,
5244        COG: 0_u16,
5245        heading: 0_u16,
5246        velocity: 0_u16,
5247        dimension_bow: 0_u16,
5248        dimension_stern: 0_u16,
5249        tslc: 0_u16,
5250        flags: AisFlags::DEFAULT,
5251        turn_rate: 0_i8,
5252        navigational_status: AisNavStatus::DEFAULT,
5253        mavtype: AisType::DEFAULT,
5254        dimension_port: 0_u8,
5255        dimension_starboard: 0_u8,
5256        callsign: [0_u8; 7usize],
5257        name: [0_u8; 20usize],
5258    };
5259    #[cfg(feature = "arbitrary")]
5260    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5261        use arbitrary::{Arbitrary, Unstructured};
5262        let mut buf = [0u8; 1024];
5263        rng.fill_bytes(&mut buf);
5264        let mut unstructured = Unstructured::new(&buf);
5265        Self::arbitrary(&mut unstructured).unwrap_or_default()
5266    }
5267}
5268impl Default for AIS_VESSEL_DATA {
5269    fn default() -> Self {
5270        Self::DEFAULT.clone()
5271    }
5272}
5273impl MessageData for AIS_VESSEL_DATA {
5274    type Message = MavMessage;
5275    const ID: u32 = 301u32;
5276    const NAME: &'static str = "AIS_VESSEL";
5277    const EXTRA_CRC: u8 = 243u8;
5278    const ENCODED_LEN: usize = 58usize;
5279    fn deser(
5280        _version: MavlinkVersion,
5281        __input: &[u8],
5282    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5283        let avail_len = __input.len();
5284        let mut payload_buf = [0; Self::ENCODED_LEN];
5285        let mut buf = if avail_len < Self::ENCODED_LEN {
5286            payload_buf[0..avail_len].copy_from_slice(__input);
5287            Bytes::new(&payload_buf)
5288        } else {
5289            Bytes::new(__input)
5290        };
5291        let mut __struct = Self::default();
5292        __struct.MMSI = buf.get_u32_le();
5293        __struct.lat = buf.get_i32_le();
5294        __struct.lon = buf.get_i32_le();
5295        __struct.COG = buf.get_u16_le();
5296        __struct.heading = buf.get_u16_le();
5297        __struct.velocity = buf.get_u16_le();
5298        __struct.dimension_bow = buf.get_u16_le();
5299        __struct.dimension_stern = buf.get_u16_le();
5300        __struct.tslc = buf.get_u16_le();
5301        let tmp = buf.get_u16_le();
5302        __struct.flags = AisFlags::from_bits(tmp & AisFlags::all().bits()).ok_or(
5303            ::mavlink_core::error::ParserError::InvalidFlag {
5304                flag_type: "AisFlags",
5305                value: tmp as u32,
5306            },
5307        )?;
5308        __struct.turn_rate = buf.get_i8();
5309        let tmp = buf.get_u8();
5310        __struct.navigational_status =
5311            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5312                enum_type: "AisNavStatus",
5313                value: tmp as u32,
5314            })?;
5315        let tmp = buf.get_u8();
5316        __struct.mavtype =
5317            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5318                enum_type: "AisType",
5319                value: tmp as u32,
5320            })?;
5321        __struct.dimension_port = buf.get_u8();
5322        __struct.dimension_starboard = buf.get_u8();
5323        for v in &mut __struct.callsign {
5324            let val = buf.get_u8();
5325            *v = val;
5326        }
5327        for v in &mut __struct.name {
5328            let val = buf.get_u8();
5329            *v = val;
5330        }
5331        Ok(__struct)
5332    }
5333    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5334        let mut __tmp = BytesMut::new(bytes);
5335        #[allow(clippy::absurd_extreme_comparisons)]
5336        #[allow(unused_comparisons)]
5337        if __tmp.remaining() < Self::ENCODED_LEN {
5338            panic!(
5339                "buffer is too small (need {} bytes, but got {})",
5340                Self::ENCODED_LEN,
5341                __tmp.remaining(),
5342            )
5343        }
5344        __tmp.put_u32_le(self.MMSI);
5345        __tmp.put_i32_le(self.lat);
5346        __tmp.put_i32_le(self.lon);
5347        __tmp.put_u16_le(self.COG);
5348        __tmp.put_u16_le(self.heading);
5349        __tmp.put_u16_le(self.velocity);
5350        __tmp.put_u16_le(self.dimension_bow);
5351        __tmp.put_u16_le(self.dimension_stern);
5352        __tmp.put_u16_le(self.tslc);
5353        __tmp.put_u16_le(self.flags.bits());
5354        __tmp.put_i8(self.turn_rate);
5355        __tmp.put_u8(self.navigational_status as u8);
5356        __tmp.put_u8(self.mavtype as u8);
5357        __tmp.put_u8(self.dimension_port);
5358        __tmp.put_u8(self.dimension_starboard);
5359        for val in &self.callsign {
5360            __tmp.put_u8(*val);
5361        }
5362        for val in &self.name {
5363            __tmp.put_u8(*val);
5364        }
5365        if matches!(version, MavlinkVersion::V2) {
5366            let len = __tmp.len();
5367            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5368        } else {
5369            __tmp.len()
5370        }
5371    }
5372}
5373#[doc = "id: 12915"]
5374#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
5375#[derive(Debug, Clone, PartialEq)]
5376#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5377#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5378pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
5379    #[doc = "System ID (0 for broadcast)."]
5380    pub target_system: u8,
5381    #[doc = "Component ID (0 for broadcast)."]
5382    pub target_component: u8,
5383    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
5384    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5385    pub id_or_mac: [u8; 20],
5386    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
5387    pub single_message_size: u8,
5388    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
5389    pub msg_pack_size: u8,
5390    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
5391    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5392    pub messages: [u8; 225],
5393}
5394impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
5395    pub const ENCODED_LEN: usize = 249usize;
5396    pub const DEFAULT: Self = Self {
5397        target_system: 0_u8,
5398        target_component: 0_u8,
5399        id_or_mac: [0_u8; 20usize],
5400        single_message_size: 0_u8,
5401        msg_pack_size: 0_u8,
5402        messages: [0_u8; 225usize],
5403    };
5404    #[cfg(feature = "arbitrary")]
5405    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5406        use arbitrary::{Arbitrary, Unstructured};
5407        let mut buf = [0u8; 1024];
5408        rng.fill_bytes(&mut buf);
5409        let mut unstructured = Unstructured::new(&buf);
5410        Self::arbitrary(&mut unstructured).unwrap_or_default()
5411    }
5412}
5413impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
5414    fn default() -> Self {
5415        Self::DEFAULT.clone()
5416    }
5417}
5418impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
5419    type Message = MavMessage;
5420    const ID: u32 = 12915u32;
5421    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
5422    const EXTRA_CRC: u8 = 94u8;
5423    const ENCODED_LEN: usize = 249usize;
5424    fn deser(
5425        _version: MavlinkVersion,
5426        __input: &[u8],
5427    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5428        let avail_len = __input.len();
5429        let mut payload_buf = [0; Self::ENCODED_LEN];
5430        let mut buf = if avail_len < Self::ENCODED_LEN {
5431            payload_buf[0..avail_len].copy_from_slice(__input);
5432            Bytes::new(&payload_buf)
5433        } else {
5434            Bytes::new(__input)
5435        };
5436        let mut __struct = Self::default();
5437        __struct.target_system = buf.get_u8();
5438        __struct.target_component = buf.get_u8();
5439        for v in &mut __struct.id_or_mac {
5440            let val = buf.get_u8();
5441            *v = val;
5442        }
5443        __struct.single_message_size = buf.get_u8();
5444        __struct.msg_pack_size = buf.get_u8();
5445        for v in &mut __struct.messages {
5446            let val = buf.get_u8();
5447            *v = val;
5448        }
5449        Ok(__struct)
5450    }
5451    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5452        let mut __tmp = BytesMut::new(bytes);
5453        #[allow(clippy::absurd_extreme_comparisons)]
5454        #[allow(unused_comparisons)]
5455        if __tmp.remaining() < Self::ENCODED_LEN {
5456            panic!(
5457                "buffer is too small (need {} bytes, but got {})",
5458                Self::ENCODED_LEN,
5459                __tmp.remaining(),
5460            )
5461        }
5462        __tmp.put_u8(self.target_system);
5463        __tmp.put_u8(self.target_component);
5464        for val in &self.id_or_mac {
5465            __tmp.put_u8(*val);
5466        }
5467        __tmp.put_u8(self.single_message_size);
5468        __tmp.put_u8(self.msg_pack_size);
5469        for val in &self.messages {
5470            __tmp.put_u8(*val);
5471        }
5472        if matches!(version, MavlinkVersion::V2) {
5473            let len = __tmp.len();
5474            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5475        } else {
5476            __tmp.len()
5477        }
5478    }
5479}
5480#[doc = "id: 12919"]
5481#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
5482#[derive(Debug, Clone, PartialEq)]
5483#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5484#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5485pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
5486    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
5487    pub operator_latitude: i32,
5488    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
5489    pub operator_longitude: i32,
5490    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
5491    pub operator_altitude_geo: f32,
5492    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
5493    pub timestamp: u32,
5494    #[doc = "System ID (0 for broadcast)."]
5495    pub target_system: u8,
5496    #[doc = "Component ID (0 for broadcast)."]
5497    pub target_component: u8,
5498}
5499impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
5500    pub const ENCODED_LEN: usize = 18usize;
5501    pub const DEFAULT: Self = Self {
5502        operator_latitude: 0_i32,
5503        operator_longitude: 0_i32,
5504        operator_altitude_geo: 0.0_f32,
5505        timestamp: 0_u32,
5506        target_system: 0_u8,
5507        target_component: 0_u8,
5508    };
5509    #[cfg(feature = "arbitrary")]
5510    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5511        use arbitrary::{Arbitrary, Unstructured};
5512        let mut buf = [0u8; 1024];
5513        rng.fill_bytes(&mut buf);
5514        let mut unstructured = Unstructured::new(&buf);
5515        Self::arbitrary(&mut unstructured).unwrap_or_default()
5516    }
5517}
5518impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
5519    fn default() -> Self {
5520        Self::DEFAULT.clone()
5521    }
5522}
5523impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
5524    type Message = MavMessage;
5525    const ID: u32 = 12919u32;
5526    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
5527    const EXTRA_CRC: u8 = 7u8;
5528    const ENCODED_LEN: usize = 18usize;
5529    fn deser(
5530        _version: MavlinkVersion,
5531        __input: &[u8],
5532    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5533        let avail_len = __input.len();
5534        let mut payload_buf = [0; Self::ENCODED_LEN];
5535        let mut buf = if avail_len < Self::ENCODED_LEN {
5536            payload_buf[0..avail_len].copy_from_slice(__input);
5537            Bytes::new(&payload_buf)
5538        } else {
5539            Bytes::new(__input)
5540        };
5541        let mut __struct = Self::default();
5542        __struct.operator_latitude = buf.get_i32_le();
5543        __struct.operator_longitude = buf.get_i32_le();
5544        __struct.operator_altitude_geo = buf.get_f32_le();
5545        __struct.timestamp = buf.get_u32_le();
5546        __struct.target_system = buf.get_u8();
5547        __struct.target_component = buf.get_u8();
5548        Ok(__struct)
5549    }
5550    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5551        let mut __tmp = BytesMut::new(bytes);
5552        #[allow(clippy::absurd_extreme_comparisons)]
5553        #[allow(unused_comparisons)]
5554        if __tmp.remaining() < Self::ENCODED_LEN {
5555            panic!(
5556                "buffer is too small (need {} bytes, but got {})",
5557                Self::ENCODED_LEN,
5558                __tmp.remaining(),
5559            )
5560        }
5561        __tmp.put_i32_le(self.operator_latitude);
5562        __tmp.put_i32_le(self.operator_longitude);
5563        __tmp.put_f32_le(self.operator_altitude_geo);
5564        __tmp.put_u32_le(self.timestamp);
5565        __tmp.put_u8(self.target_system);
5566        __tmp.put_u8(self.target_component);
5567        if matches!(version, MavlinkVersion::V2) {
5568            let len = __tmp.len();
5569            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5570        } else {
5571            __tmp.len()
5572        }
5573    }
5574}
5575#[doc = "id: 93"]
5576#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
5577#[derive(Debug, Clone, PartialEq)]
5578#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5579#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5580pub struct HIL_ACTUATOR_CONTROLS_DATA {
5581    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5582    pub time_usec: u64,
5583    #[doc = "Flags bitmask."]
5584    pub flags: HilActuatorControlsFlags,
5585    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
5586    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5587    pub controls: [f32; 16],
5588    #[doc = "System mode. Includes arming state."]
5589    pub mode: MavModeFlag,
5590}
5591impl HIL_ACTUATOR_CONTROLS_DATA {
5592    pub const ENCODED_LEN: usize = 81usize;
5593    pub const DEFAULT: Self = Self {
5594        time_usec: 0_u64,
5595        flags: HilActuatorControlsFlags::DEFAULT,
5596        controls: [0.0_f32; 16usize],
5597        mode: MavModeFlag::DEFAULT,
5598    };
5599    #[cfg(feature = "arbitrary")]
5600    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5601        use arbitrary::{Arbitrary, Unstructured};
5602        let mut buf = [0u8; 1024];
5603        rng.fill_bytes(&mut buf);
5604        let mut unstructured = Unstructured::new(&buf);
5605        Self::arbitrary(&mut unstructured).unwrap_or_default()
5606    }
5607}
5608impl Default for HIL_ACTUATOR_CONTROLS_DATA {
5609    fn default() -> Self {
5610        Self::DEFAULT.clone()
5611    }
5612}
5613impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
5614    type Message = MavMessage;
5615    const ID: u32 = 93u32;
5616    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
5617    const EXTRA_CRC: u8 = 47u8;
5618    const ENCODED_LEN: usize = 81usize;
5619    fn deser(
5620        _version: MavlinkVersion,
5621        __input: &[u8],
5622    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5623        let avail_len = __input.len();
5624        let mut payload_buf = [0; Self::ENCODED_LEN];
5625        let mut buf = if avail_len < Self::ENCODED_LEN {
5626            payload_buf[0..avail_len].copy_from_slice(__input);
5627            Bytes::new(&payload_buf)
5628        } else {
5629            Bytes::new(__input)
5630        };
5631        let mut __struct = Self::default();
5632        __struct.time_usec = buf.get_u64_le();
5633        let tmp = buf.get_u64_le();
5634        __struct.flags =
5635            HilActuatorControlsFlags::from_bits(tmp & HilActuatorControlsFlags::all().bits())
5636                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5637                    flag_type: "HilActuatorControlsFlags",
5638                    value: tmp as u32,
5639                })?;
5640        for v in &mut __struct.controls {
5641            let val = buf.get_f32_le();
5642            *v = val;
5643        }
5644        let tmp = buf.get_u8();
5645        __struct.mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
5646            ::mavlink_core::error::ParserError::InvalidFlag {
5647                flag_type: "MavModeFlag",
5648                value: tmp as u32,
5649            },
5650        )?;
5651        Ok(__struct)
5652    }
5653    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5654        let mut __tmp = BytesMut::new(bytes);
5655        #[allow(clippy::absurd_extreme_comparisons)]
5656        #[allow(unused_comparisons)]
5657        if __tmp.remaining() < Self::ENCODED_LEN {
5658            panic!(
5659                "buffer is too small (need {} bytes, but got {})",
5660                Self::ENCODED_LEN,
5661                __tmp.remaining(),
5662            )
5663        }
5664        __tmp.put_u64_le(self.time_usec);
5665        __tmp.put_u64_le(self.flags.bits());
5666        for val in &self.controls {
5667            __tmp.put_f32_le(*val);
5668        }
5669        __tmp.put_u8(self.mode.bits());
5670        if matches!(version, MavlinkVersion::V2) {
5671            let len = __tmp.len();
5672            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5673        } else {
5674            __tmp.len()
5675        }
5676    }
5677}
5678#[doc = "id: 395"]
5679#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
5680#[derive(Debug, Clone, PartialEq)]
5681#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5682#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5683pub struct COMPONENT_INFORMATION_DATA {
5684    #[doc = "Timestamp (time since system boot)."]
5685    pub time_boot_ms: u32,
5686    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
5687    pub general_metadata_file_crc: u32,
5688    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
5689    pub peripherals_metadata_file_crc: u32,
5690    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
5691    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5692    pub general_metadata_uri: [u8; 100],
5693    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
5694    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5695    pub peripherals_metadata_uri: [u8; 100],
5696}
5697impl COMPONENT_INFORMATION_DATA {
5698    pub const ENCODED_LEN: usize = 212usize;
5699    pub const DEFAULT: Self = Self {
5700        time_boot_ms: 0_u32,
5701        general_metadata_file_crc: 0_u32,
5702        peripherals_metadata_file_crc: 0_u32,
5703        general_metadata_uri: [0_u8; 100usize],
5704        peripherals_metadata_uri: [0_u8; 100usize],
5705    };
5706    #[cfg(feature = "arbitrary")]
5707    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5708        use arbitrary::{Arbitrary, Unstructured};
5709        let mut buf = [0u8; 1024];
5710        rng.fill_bytes(&mut buf);
5711        let mut unstructured = Unstructured::new(&buf);
5712        Self::arbitrary(&mut unstructured).unwrap_or_default()
5713    }
5714}
5715impl Default for COMPONENT_INFORMATION_DATA {
5716    fn default() -> Self {
5717        Self::DEFAULT.clone()
5718    }
5719}
5720impl MessageData for COMPONENT_INFORMATION_DATA {
5721    type Message = MavMessage;
5722    const ID: u32 = 395u32;
5723    const NAME: &'static str = "COMPONENT_INFORMATION";
5724    const EXTRA_CRC: u8 = 0u8;
5725    const ENCODED_LEN: usize = 212usize;
5726    fn deser(
5727        _version: MavlinkVersion,
5728        __input: &[u8],
5729    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5730        let avail_len = __input.len();
5731        let mut payload_buf = [0; Self::ENCODED_LEN];
5732        let mut buf = if avail_len < Self::ENCODED_LEN {
5733            payload_buf[0..avail_len].copy_from_slice(__input);
5734            Bytes::new(&payload_buf)
5735        } else {
5736            Bytes::new(__input)
5737        };
5738        let mut __struct = Self::default();
5739        __struct.time_boot_ms = buf.get_u32_le();
5740        __struct.general_metadata_file_crc = buf.get_u32_le();
5741        __struct.peripherals_metadata_file_crc = buf.get_u32_le();
5742        for v in &mut __struct.general_metadata_uri {
5743            let val = buf.get_u8();
5744            *v = val;
5745        }
5746        for v in &mut __struct.peripherals_metadata_uri {
5747            let val = buf.get_u8();
5748            *v = val;
5749        }
5750        Ok(__struct)
5751    }
5752    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5753        let mut __tmp = BytesMut::new(bytes);
5754        #[allow(clippy::absurd_extreme_comparisons)]
5755        #[allow(unused_comparisons)]
5756        if __tmp.remaining() < Self::ENCODED_LEN {
5757            panic!(
5758                "buffer is too small (need {} bytes, but got {})",
5759                Self::ENCODED_LEN,
5760                __tmp.remaining(),
5761            )
5762        }
5763        __tmp.put_u32_le(self.time_boot_ms);
5764        __tmp.put_u32_le(self.general_metadata_file_crc);
5765        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
5766        for val in &self.general_metadata_uri {
5767            __tmp.put_u8(*val);
5768        }
5769        for val in &self.peripherals_metadata_uri {
5770            __tmp.put_u8(*val);
5771        }
5772        if matches!(version, MavlinkVersion::V2) {
5773            let len = __tmp.len();
5774            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5775        } else {
5776            __tmp.len()
5777        }
5778    }
5779}
5780#[doc = "id: 84"]
5781#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
5782#[derive(Debug, Clone, PartialEq)]
5783#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5784#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5785pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
5786    #[doc = "Timestamp (time since system boot)."]
5787    pub time_boot_ms: u32,
5788    #[doc = "X Position in NED frame"]
5789    pub x: f32,
5790    #[doc = "Y Position in NED frame"]
5791    pub y: f32,
5792    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
5793    pub z: f32,
5794    #[doc = "X velocity in NED frame"]
5795    pub vx: f32,
5796    #[doc = "Y velocity in NED frame"]
5797    pub vy: f32,
5798    #[doc = "Z velocity in NED frame"]
5799    pub vz: f32,
5800    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
5801    pub afx: f32,
5802    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
5803    pub afy: f32,
5804    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
5805    pub afz: f32,
5806    #[doc = "yaw setpoint"]
5807    pub yaw: f32,
5808    #[doc = "yaw rate setpoint"]
5809    pub yaw_rate: f32,
5810    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
5811    pub type_mask: PositionTargetTypemask,
5812    #[doc = "System ID"]
5813    pub target_system: u8,
5814    #[doc = "Component ID"]
5815    pub target_component: u8,
5816    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
5817    pub coordinate_frame: MavFrame,
5818}
5819impl SET_POSITION_TARGET_LOCAL_NED_DATA {
5820    pub const ENCODED_LEN: usize = 53usize;
5821    pub const DEFAULT: Self = Self {
5822        time_boot_ms: 0_u32,
5823        x: 0.0_f32,
5824        y: 0.0_f32,
5825        z: 0.0_f32,
5826        vx: 0.0_f32,
5827        vy: 0.0_f32,
5828        vz: 0.0_f32,
5829        afx: 0.0_f32,
5830        afy: 0.0_f32,
5831        afz: 0.0_f32,
5832        yaw: 0.0_f32,
5833        yaw_rate: 0.0_f32,
5834        type_mask: PositionTargetTypemask::DEFAULT,
5835        target_system: 0_u8,
5836        target_component: 0_u8,
5837        coordinate_frame: MavFrame::DEFAULT,
5838    };
5839    #[cfg(feature = "arbitrary")]
5840    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5841        use arbitrary::{Arbitrary, Unstructured};
5842        let mut buf = [0u8; 1024];
5843        rng.fill_bytes(&mut buf);
5844        let mut unstructured = Unstructured::new(&buf);
5845        Self::arbitrary(&mut unstructured).unwrap_or_default()
5846    }
5847}
5848impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
5849    fn default() -> Self {
5850        Self::DEFAULT.clone()
5851    }
5852}
5853impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
5854    type Message = MavMessage;
5855    const ID: u32 = 84u32;
5856    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
5857    const EXTRA_CRC: u8 = 143u8;
5858    const ENCODED_LEN: usize = 53usize;
5859    fn deser(
5860        _version: MavlinkVersion,
5861        __input: &[u8],
5862    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5863        let avail_len = __input.len();
5864        let mut payload_buf = [0; Self::ENCODED_LEN];
5865        let mut buf = if avail_len < Self::ENCODED_LEN {
5866            payload_buf[0..avail_len].copy_from_slice(__input);
5867            Bytes::new(&payload_buf)
5868        } else {
5869            Bytes::new(__input)
5870        };
5871        let mut __struct = Self::default();
5872        __struct.time_boot_ms = buf.get_u32_le();
5873        __struct.x = buf.get_f32_le();
5874        __struct.y = buf.get_f32_le();
5875        __struct.z = buf.get_f32_le();
5876        __struct.vx = buf.get_f32_le();
5877        __struct.vy = buf.get_f32_le();
5878        __struct.vz = buf.get_f32_le();
5879        __struct.afx = buf.get_f32_le();
5880        __struct.afy = buf.get_f32_le();
5881        __struct.afz = buf.get_f32_le();
5882        __struct.yaw = buf.get_f32_le();
5883        __struct.yaw_rate = buf.get_f32_le();
5884        let tmp = buf.get_u16_le();
5885        __struct.type_mask = PositionTargetTypemask::from_bits(
5886            tmp & PositionTargetTypemask::all().bits(),
5887        )
5888        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5889            flag_type: "PositionTargetTypemask",
5890            value: tmp as u32,
5891        })?;
5892        __struct.target_system = buf.get_u8();
5893        __struct.target_component = buf.get_u8();
5894        let tmp = buf.get_u8();
5895        __struct.coordinate_frame =
5896            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5897                enum_type: "MavFrame",
5898                value: tmp as u32,
5899            })?;
5900        Ok(__struct)
5901    }
5902    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5903        let mut __tmp = BytesMut::new(bytes);
5904        #[allow(clippy::absurd_extreme_comparisons)]
5905        #[allow(unused_comparisons)]
5906        if __tmp.remaining() < Self::ENCODED_LEN {
5907            panic!(
5908                "buffer is too small (need {} bytes, but got {})",
5909                Self::ENCODED_LEN,
5910                __tmp.remaining(),
5911            )
5912        }
5913        __tmp.put_u32_le(self.time_boot_ms);
5914        __tmp.put_f32_le(self.x);
5915        __tmp.put_f32_le(self.y);
5916        __tmp.put_f32_le(self.z);
5917        __tmp.put_f32_le(self.vx);
5918        __tmp.put_f32_le(self.vy);
5919        __tmp.put_f32_le(self.vz);
5920        __tmp.put_f32_le(self.afx);
5921        __tmp.put_f32_le(self.afy);
5922        __tmp.put_f32_le(self.afz);
5923        __tmp.put_f32_le(self.yaw);
5924        __tmp.put_f32_le(self.yaw_rate);
5925        __tmp.put_u16_le(self.type_mask.bits());
5926        __tmp.put_u8(self.target_system);
5927        __tmp.put_u8(self.target_component);
5928        __tmp.put_u8(self.coordinate_frame as u8);
5929        if matches!(version, MavlinkVersion::V2) {
5930            let len = __tmp.len();
5931            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5932        } else {
5933            __tmp.len()
5934        }
5935    }
5936}
5937#[doc = "id: 400"]
5938#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
5939#[derive(Debug, Clone, PartialEq)]
5940#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5941#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5942pub struct PLAY_TUNE_V2_DATA {
5943    #[doc = "Tune format"]
5944    pub format: TuneFormat,
5945    #[doc = "System ID"]
5946    pub target_system: u8,
5947    #[doc = "Component ID"]
5948    pub target_component: u8,
5949    #[doc = "Tune definition as a NULL-terminated string."]
5950    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5951    pub tune: [u8; 248],
5952}
5953impl PLAY_TUNE_V2_DATA {
5954    pub const ENCODED_LEN: usize = 254usize;
5955    pub const DEFAULT: Self = Self {
5956        format: TuneFormat::DEFAULT,
5957        target_system: 0_u8,
5958        target_component: 0_u8,
5959        tune: [0_u8; 248usize],
5960    };
5961    #[cfg(feature = "arbitrary")]
5962    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5963        use arbitrary::{Arbitrary, Unstructured};
5964        let mut buf = [0u8; 1024];
5965        rng.fill_bytes(&mut buf);
5966        let mut unstructured = Unstructured::new(&buf);
5967        Self::arbitrary(&mut unstructured).unwrap_or_default()
5968    }
5969}
5970impl Default for PLAY_TUNE_V2_DATA {
5971    fn default() -> Self {
5972        Self::DEFAULT.clone()
5973    }
5974}
5975impl MessageData for PLAY_TUNE_V2_DATA {
5976    type Message = MavMessage;
5977    const ID: u32 = 400u32;
5978    const NAME: &'static str = "PLAY_TUNE_V2";
5979    const EXTRA_CRC: u8 = 110u8;
5980    const ENCODED_LEN: usize = 254usize;
5981    fn deser(
5982        _version: MavlinkVersion,
5983        __input: &[u8],
5984    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5985        let avail_len = __input.len();
5986        let mut payload_buf = [0; Self::ENCODED_LEN];
5987        let mut buf = if avail_len < Self::ENCODED_LEN {
5988            payload_buf[0..avail_len].copy_from_slice(__input);
5989            Bytes::new(&payload_buf)
5990        } else {
5991            Bytes::new(__input)
5992        };
5993        let mut __struct = Self::default();
5994        let tmp = buf.get_u32_le();
5995        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
5996            ::mavlink_core::error::ParserError::InvalidEnum {
5997                enum_type: "TuneFormat",
5998                value: tmp as u32,
5999            },
6000        )?;
6001        __struct.target_system = buf.get_u8();
6002        __struct.target_component = buf.get_u8();
6003        for v in &mut __struct.tune {
6004            let val = buf.get_u8();
6005            *v = val;
6006        }
6007        Ok(__struct)
6008    }
6009    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6010        let mut __tmp = BytesMut::new(bytes);
6011        #[allow(clippy::absurd_extreme_comparisons)]
6012        #[allow(unused_comparisons)]
6013        if __tmp.remaining() < Self::ENCODED_LEN {
6014            panic!(
6015                "buffer is too small (need {} bytes, but got {})",
6016                Self::ENCODED_LEN,
6017                __tmp.remaining(),
6018            )
6019        }
6020        __tmp.put_u32_le(self.format as u32);
6021        __tmp.put_u8(self.target_system);
6022        __tmp.put_u8(self.target_component);
6023        for val in &self.tune {
6024            __tmp.put_u8(*val);
6025        }
6026        if matches!(version, MavlinkVersion::V2) {
6027            let len = __tmp.len();
6028            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6029        } else {
6030            __tmp.len()
6031        }
6032    }
6033}
6034#[doc = "id: 1"]
6035#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
6036#[derive(Debug, Clone, PartialEq)]
6037#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6038#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6039pub struct SYS_STATUS_DATA {
6040    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
6041    pub onboard_control_sensors_present: MavSysStatusSensor,
6042    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
6043    pub onboard_control_sensors_enabled: MavSysStatusSensor,
6044    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
6045    pub onboard_control_sensors_health: MavSysStatusSensor,
6046    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
6047    pub load: u16,
6048    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
6049    pub voltage_battery: u16,
6050    #[doc = "Battery current, -1: Current not sent by autopilot"]
6051    pub current_battery: i16,
6052    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
6053    pub drop_rate_comm: u16,
6054    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
6055    pub errors_comm: u16,
6056    #[doc = "Autopilot-specific errors"]
6057    pub errors_count1: u16,
6058    #[doc = "Autopilot-specific errors"]
6059    pub errors_count2: u16,
6060    #[doc = "Autopilot-specific errors"]
6061    pub errors_count3: u16,
6062    #[doc = "Autopilot-specific errors"]
6063    pub errors_count4: u16,
6064    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
6065    pub battery_remaining: i8,
6066    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
6067    #[cfg_attr(feature = "serde", serde(default))]
6068    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
6069    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
6070    #[cfg_attr(feature = "serde", serde(default))]
6071    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
6072    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
6073    #[cfg_attr(feature = "serde", serde(default))]
6074    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
6075}
6076impl SYS_STATUS_DATA {
6077    pub const ENCODED_LEN: usize = 43usize;
6078    pub const DEFAULT: Self = Self {
6079        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
6080        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
6081        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
6082        load: 0_u16,
6083        voltage_battery: 0_u16,
6084        current_battery: 0_i16,
6085        drop_rate_comm: 0_u16,
6086        errors_comm: 0_u16,
6087        errors_count1: 0_u16,
6088        errors_count2: 0_u16,
6089        errors_count3: 0_u16,
6090        errors_count4: 0_u16,
6091        battery_remaining: 0_i8,
6092        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
6093        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
6094        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
6095    };
6096    #[cfg(feature = "arbitrary")]
6097    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6098        use arbitrary::{Arbitrary, Unstructured};
6099        let mut buf = [0u8; 1024];
6100        rng.fill_bytes(&mut buf);
6101        let mut unstructured = Unstructured::new(&buf);
6102        Self::arbitrary(&mut unstructured).unwrap_or_default()
6103    }
6104}
6105impl Default for SYS_STATUS_DATA {
6106    fn default() -> Self {
6107        Self::DEFAULT.clone()
6108    }
6109}
6110impl MessageData for SYS_STATUS_DATA {
6111    type Message = MavMessage;
6112    const ID: u32 = 1u32;
6113    const NAME: &'static str = "SYS_STATUS";
6114    const EXTRA_CRC: u8 = 124u8;
6115    const ENCODED_LEN: usize = 43usize;
6116    fn deser(
6117        _version: MavlinkVersion,
6118        __input: &[u8],
6119    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6120        let avail_len = __input.len();
6121        let mut payload_buf = [0; Self::ENCODED_LEN];
6122        let mut buf = if avail_len < Self::ENCODED_LEN {
6123            payload_buf[0..avail_len].copy_from_slice(__input);
6124            Bytes::new(&payload_buf)
6125        } else {
6126            Bytes::new(__input)
6127        };
6128        let mut __struct = Self::default();
6129        let tmp = buf.get_u32_le();
6130        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
6131            tmp & MavSysStatusSensor::all().bits(),
6132        )
6133        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6134            flag_type: "MavSysStatusSensor",
6135            value: tmp as u32,
6136        })?;
6137        let tmp = buf.get_u32_le();
6138        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
6139            tmp & MavSysStatusSensor::all().bits(),
6140        )
6141        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6142            flag_type: "MavSysStatusSensor",
6143            value: tmp as u32,
6144        })?;
6145        let tmp = buf.get_u32_le();
6146        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
6147            tmp & MavSysStatusSensor::all().bits(),
6148        )
6149        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6150            flag_type: "MavSysStatusSensor",
6151            value: tmp as u32,
6152        })?;
6153        __struct.load = buf.get_u16_le();
6154        __struct.voltage_battery = buf.get_u16_le();
6155        __struct.current_battery = buf.get_i16_le();
6156        __struct.drop_rate_comm = buf.get_u16_le();
6157        __struct.errors_comm = buf.get_u16_le();
6158        __struct.errors_count1 = buf.get_u16_le();
6159        __struct.errors_count2 = buf.get_u16_le();
6160        __struct.errors_count3 = buf.get_u16_le();
6161        __struct.errors_count4 = buf.get_u16_le();
6162        __struct.battery_remaining = buf.get_i8();
6163        let tmp = buf.get_u32_le();
6164        __struct.onboard_control_sensors_present_extended =
6165            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
6166                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6167                flag_type: "MavSysStatusSensorExtended",
6168                value: tmp as u32,
6169            })?;
6170        let tmp = buf.get_u32_le();
6171        __struct.onboard_control_sensors_enabled_extended =
6172            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
6173                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6174                flag_type: "MavSysStatusSensorExtended",
6175                value: tmp as u32,
6176            })?;
6177        let tmp = buf.get_u32_le();
6178        __struct.onboard_control_sensors_health_extended =
6179            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
6180                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6181                flag_type: "MavSysStatusSensorExtended",
6182                value: tmp as u32,
6183            })?;
6184        Ok(__struct)
6185    }
6186    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6187        let mut __tmp = BytesMut::new(bytes);
6188        #[allow(clippy::absurd_extreme_comparisons)]
6189        #[allow(unused_comparisons)]
6190        if __tmp.remaining() < Self::ENCODED_LEN {
6191            panic!(
6192                "buffer is too small (need {} bytes, but got {})",
6193                Self::ENCODED_LEN,
6194                __tmp.remaining(),
6195            )
6196        }
6197        __tmp.put_u32_le(self.onboard_control_sensors_present.bits());
6198        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits());
6199        __tmp.put_u32_le(self.onboard_control_sensors_health.bits());
6200        __tmp.put_u16_le(self.load);
6201        __tmp.put_u16_le(self.voltage_battery);
6202        __tmp.put_i16_le(self.current_battery);
6203        __tmp.put_u16_le(self.drop_rate_comm);
6204        __tmp.put_u16_le(self.errors_comm);
6205        __tmp.put_u16_le(self.errors_count1);
6206        __tmp.put_u16_le(self.errors_count2);
6207        __tmp.put_u16_le(self.errors_count3);
6208        __tmp.put_u16_le(self.errors_count4);
6209        __tmp.put_i8(self.battery_remaining);
6210        __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits());
6211        __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits());
6212        __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits());
6213        if matches!(version, MavlinkVersion::V2) {
6214            let len = __tmp.len();
6215            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6216        } else {
6217            __tmp.len()
6218        }
6219    }
6220}
6221#[doc = "id: 102"]
6222#[doc = "Local position/attitude estimate from a vision source."]
6223#[derive(Debug, Clone, PartialEq)]
6224#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6225#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6226pub struct VISION_POSITION_ESTIMATE_DATA {
6227    #[doc = "Timestamp (UNIX time or time since system boot)"]
6228    pub usec: u64,
6229    #[doc = "Local X position"]
6230    pub x: f32,
6231    #[doc = "Local Y position"]
6232    pub y: f32,
6233    #[doc = "Local Z position"]
6234    pub z: f32,
6235    #[doc = "Roll angle"]
6236    pub roll: f32,
6237    #[doc = "Pitch angle"]
6238    pub pitch: f32,
6239    #[doc = "Yaw angle"]
6240    pub yaw: f32,
6241    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
6242    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6243    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6244    pub covariance: [f32; 21],
6245    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
6246    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6247    pub reset_counter: u8,
6248}
6249impl VISION_POSITION_ESTIMATE_DATA {
6250    pub const ENCODED_LEN: usize = 117usize;
6251    pub const DEFAULT: Self = Self {
6252        usec: 0_u64,
6253        x: 0.0_f32,
6254        y: 0.0_f32,
6255        z: 0.0_f32,
6256        roll: 0.0_f32,
6257        pitch: 0.0_f32,
6258        yaw: 0.0_f32,
6259        covariance: [0.0_f32; 21usize],
6260        reset_counter: 0_u8,
6261    };
6262    #[cfg(feature = "arbitrary")]
6263    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6264        use arbitrary::{Arbitrary, Unstructured};
6265        let mut buf = [0u8; 1024];
6266        rng.fill_bytes(&mut buf);
6267        let mut unstructured = Unstructured::new(&buf);
6268        Self::arbitrary(&mut unstructured).unwrap_or_default()
6269    }
6270}
6271impl Default for VISION_POSITION_ESTIMATE_DATA {
6272    fn default() -> Self {
6273        Self::DEFAULT.clone()
6274    }
6275}
6276impl MessageData for VISION_POSITION_ESTIMATE_DATA {
6277    type Message = MavMessage;
6278    const ID: u32 = 102u32;
6279    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
6280    const EXTRA_CRC: u8 = 158u8;
6281    const ENCODED_LEN: usize = 117usize;
6282    fn deser(
6283        _version: MavlinkVersion,
6284        __input: &[u8],
6285    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6286        let avail_len = __input.len();
6287        let mut payload_buf = [0; Self::ENCODED_LEN];
6288        let mut buf = if avail_len < Self::ENCODED_LEN {
6289            payload_buf[0..avail_len].copy_from_slice(__input);
6290            Bytes::new(&payload_buf)
6291        } else {
6292            Bytes::new(__input)
6293        };
6294        let mut __struct = Self::default();
6295        __struct.usec = buf.get_u64_le();
6296        __struct.x = buf.get_f32_le();
6297        __struct.y = buf.get_f32_le();
6298        __struct.z = buf.get_f32_le();
6299        __struct.roll = buf.get_f32_le();
6300        __struct.pitch = buf.get_f32_le();
6301        __struct.yaw = buf.get_f32_le();
6302        for v in &mut __struct.covariance {
6303            let val = buf.get_f32_le();
6304            *v = val;
6305        }
6306        __struct.reset_counter = buf.get_u8();
6307        Ok(__struct)
6308    }
6309    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6310        let mut __tmp = BytesMut::new(bytes);
6311        #[allow(clippy::absurd_extreme_comparisons)]
6312        #[allow(unused_comparisons)]
6313        if __tmp.remaining() < Self::ENCODED_LEN {
6314            panic!(
6315                "buffer is too small (need {} bytes, but got {})",
6316                Self::ENCODED_LEN,
6317                __tmp.remaining(),
6318            )
6319        }
6320        __tmp.put_u64_le(self.usec);
6321        __tmp.put_f32_le(self.x);
6322        __tmp.put_f32_le(self.y);
6323        __tmp.put_f32_le(self.z);
6324        __tmp.put_f32_le(self.roll);
6325        __tmp.put_f32_le(self.pitch);
6326        __tmp.put_f32_le(self.yaw);
6327        for val in &self.covariance {
6328            __tmp.put_f32_le(*val);
6329        }
6330        __tmp.put_u8(self.reset_counter);
6331        if matches!(version, MavlinkVersion::V2) {
6332            let len = __tmp.len();
6333            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6334        } else {
6335            __tmp.len()
6336        }
6337    }
6338}
6339#[doc = "id: 7"]
6340#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
6341#[derive(Debug, Clone, PartialEq)]
6342#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6343#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6344pub struct AUTH_KEY_DATA {
6345    #[doc = "key"]
6346    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6347    pub key: [u8; 32],
6348}
6349impl AUTH_KEY_DATA {
6350    pub const ENCODED_LEN: usize = 32usize;
6351    pub const DEFAULT: Self = Self {
6352        key: [0_u8; 32usize],
6353    };
6354    #[cfg(feature = "arbitrary")]
6355    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6356        use arbitrary::{Arbitrary, Unstructured};
6357        let mut buf = [0u8; 1024];
6358        rng.fill_bytes(&mut buf);
6359        let mut unstructured = Unstructured::new(&buf);
6360        Self::arbitrary(&mut unstructured).unwrap_or_default()
6361    }
6362}
6363impl Default for AUTH_KEY_DATA {
6364    fn default() -> Self {
6365        Self::DEFAULT.clone()
6366    }
6367}
6368impl MessageData for AUTH_KEY_DATA {
6369    type Message = MavMessage;
6370    const ID: u32 = 7u32;
6371    const NAME: &'static str = "AUTH_KEY";
6372    const EXTRA_CRC: u8 = 119u8;
6373    const ENCODED_LEN: usize = 32usize;
6374    fn deser(
6375        _version: MavlinkVersion,
6376        __input: &[u8],
6377    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6378        let avail_len = __input.len();
6379        let mut payload_buf = [0; Self::ENCODED_LEN];
6380        let mut buf = if avail_len < Self::ENCODED_LEN {
6381            payload_buf[0..avail_len].copy_from_slice(__input);
6382            Bytes::new(&payload_buf)
6383        } else {
6384            Bytes::new(__input)
6385        };
6386        let mut __struct = Self::default();
6387        for v in &mut __struct.key {
6388            let val = buf.get_u8();
6389            *v = val;
6390        }
6391        Ok(__struct)
6392    }
6393    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6394        let mut __tmp = BytesMut::new(bytes);
6395        #[allow(clippy::absurd_extreme_comparisons)]
6396        #[allow(unused_comparisons)]
6397        if __tmp.remaining() < Self::ENCODED_LEN {
6398            panic!(
6399                "buffer is too small (need {} bytes, but got {})",
6400                Self::ENCODED_LEN,
6401                __tmp.remaining(),
6402            )
6403        }
6404        for val in &self.key {
6405            __tmp.put_u8(*val);
6406        }
6407        if matches!(version, MavlinkVersion::V2) {
6408            let len = __tmp.len();
6409            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6410        } else {
6411            __tmp.len()
6412        }
6413    }
6414}
6415#[doc = "id: 80"]
6416#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
6417#[derive(Debug, Clone, PartialEq)]
6418#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6419#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6420pub struct COMMAND_CANCEL_DATA {
6421    #[doc = "Command ID (of command to cancel)."]
6422    pub command: MavCmd,
6423    #[doc = "System executing long running command. Should not be broadcast (0)."]
6424    pub target_system: u8,
6425    #[doc = "Component executing long running command."]
6426    pub target_component: u8,
6427}
6428impl COMMAND_CANCEL_DATA {
6429    pub const ENCODED_LEN: usize = 4usize;
6430    pub const DEFAULT: Self = Self {
6431        command: MavCmd::DEFAULT,
6432        target_system: 0_u8,
6433        target_component: 0_u8,
6434    };
6435    #[cfg(feature = "arbitrary")]
6436    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6437        use arbitrary::{Arbitrary, Unstructured};
6438        let mut buf = [0u8; 1024];
6439        rng.fill_bytes(&mut buf);
6440        let mut unstructured = Unstructured::new(&buf);
6441        Self::arbitrary(&mut unstructured).unwrap_or_default()
6442    }
6443}
6444impl Default for COMMAND_CANCEL_DATA {
6445    fn default() -> Self {
6446        Self::DEFAULT.clone()
6447    }
6448}
6449impl MessageData for COMMAND_CANCEL_DATA {
6450    type Message = MavMessage;
6451    const ID: u32 = 80u32;
6452    const NAME: &'static str = "COMMAND_CANCEL";
6453    const EXTRA_CRC: u8 = 14u8;
6454    const ENCODED_LEN: usize = 4usize;
6455    fn deser(
6456        _version: MavlinkVersion,
6457        __input: &[u8],
6458    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6459        let avail_len = __input.len();
6460        let mut payload_buf = [0; Self::ENCODED_LEN];
6461        let mut buf = if avail_len < Self::ENCODED_LEN {
6462            payload_buf[0..avail_len].copy_from_slice(__input);
6463            Bytes::new(&payload_buf)
6464        } else {
6465            Bytes::new(__input)
6466        };
6467        let mut __struct = Self::default();
6468        let tmp = buf.get_u16_le();
6469        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
6470            ::mavlink_core::error::ParserError::InvalidEnum {
6471                enum_type: "MavCmd",
6472                value: tmp as u32,
6473            },
6474        )?;
6475        __struct.target_system = buf.get_u8();
6476        __struct.target_component = buf.get_u8();
6477        Ok(__struct)
6478    }
6479    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6480        let mut __tmp = BytesMut::new(bytes);
6481        #[allow(clippy::absurd_extreme_comparisons)]
6482        #[allow(unused_comparisons)]
6483        if __tmp.remaining() < Self::ENCODED_LEN {
6484            panic!(
6485                "buffer is too small (need {} bytes, but got {})",
6486                Self::ENCODED_LEN,
6487                __tmp.remaining(),
6488            )
6489        }
6490        __tmp.put_u16_le(self.command as u16);
6491        __tmp.put_u8(self.target_system);
6492        __tmp.put_u8(self.target_component);
6493        if matches!(version, MavlinkVersion::V2) {
6494            let len = __tmp.len();
6495            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6496        } else {
6497            __tmp.len()
6498        }
6499    }
6500}
6501#[doc = "id: 413"]
6502#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
6503#[derive(Debug, Clone, PartialEq)]
6504#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6505#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6506pub struct RESPONSE_EVENT_ERROR_DATA {
6507    #[doc = "Sequence number."]
6508    pub sequence: u16,
6509    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
6510    pub sequence_oldest_available: u16,
6511    #[doc = "System ID"]
6512    pub target_system: u8,
6513    #[doc = "Component ID"]
6514    pub target_component: u8,
6515    #[doc = "Error reason."]
6516    pub reason: MavEventErrorReason,
6517}
6518impl RESPONSE_EVENT_ERROR_DATA {
6519    pub const ENCODED_LEN: usize = 7usize;
6520    pub const DEFAULT: Self = Self {
6521        sequence: 0_u16,
6522        sequence_oldest_available: 0_u16,
6523        target_system: 0_u8,
6524        target_component: 0_u8,
6525        reason: MavEventErrorReason::DEFAULT,
6526    };
6527    #[cfg(feature = "arbitrary")]
6528    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6529        use arbitrary::{Arbitrary, Unstructured};
6530        let mut buf = [0u8; 1024];
6531        rng.fill_bytes(&mut buf);
6532        let mut unstructured = Unstructured::new(&buf);
6533        Self::arbitrary(&mut unstructured).unwrap_or_default()
6534    }
6535}
6536impl Default for RESPONSE_EVENT_ERROR_DATA {
6537    fn default() -> Self {
6538        Self::DEFAULT.clone()
6539    }
6540}
6541impl MessageData for RESPONSE_EVENT_ERROR_DATA {
6542    type Message = MavMessage;
6543    const ID: u32 = 413u32;
6544    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
6545    const EXTRA_CRC: u8 = 77u8;
6546    const ENCODED_LEN: usize = 7usize;
6547    fn deser(
6548        _version: MavlinkVersion,
6549        __input: &[u8],
6550    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6551        let avail_len = __input.len();
6552        let mut payload_buf = [0; Self::ENCODED_LEN];
6553        let mut buf = if avail_len < Self::ENCODED_LEN {
6554            payload_buf[0..avail_len].copy_from_slice(__input);
6555            Bytes::new(&payload_buf)
6556        } else {
6557            Bytes::new(__input)
6558        };
6559        let mut __struct = Self::default();
6560        __struct.sequence = buf.get_u16_le();
6561        __struct.sequence_oldest_available = buf.get_u16_le();
6562        __struct.target_system = buf.get_u8();
6563        __struct.target_component = buf.get_u8();
6564        let tmp = buf.get_u8();
6565        __struct.reason =
6566            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6567                enum_type: "MavEventErrorReason",
6568                value: tmp as u32,
6569            })?;
6570        Ok(__struct)
6571    }
6572    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6573        let mut __tmp = BytesMut::new(bytes);
6574        #[allow(clippy::absurd_extreme_comparisons)]
6575        #[allow(unused_comparisons)]
6576        if __tmp.remaining() < Self::ENCODED_LEN {
6577            panic!(
6578                "buffer is too small (need {} bytes, but got {})",
6579                Self::ENCODED_LEN,
6580                __tmp.remaining(),
6581            )
6582        }
6583        __tmp.put_u16_le(self.sequence);
6584        __tmp.put_u16_le(self.sequence_oldest_available);
6585        __tmp.put_u8(self.target_system);
6586        __tmp.put_u8(self.target_component);
6587        __tmp.put_u8(self.reason as u8);
6588        if matches!(version, MavlinkVersion::V2) {
6589            let len = __tmp.len();
6590            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6591        } else {
6592            __tmp.len()
6593        }
6594    }
6595}
6596#[doc = "id: 122"]
6597#[doc = "Stop log transfer and resume normal logging."]
6598#[derive(Debug, Clone, PartialEq)]
6599#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6600#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6601pub struct LOG_REQUEST_END_DATA {
6602    #[doc = "System ID"]
6603    pub target_system: u8,
6604    #[doc = "Component ID"]
6605    pub target_component: u8,
6606}
6607impl LOG_REQUEST_END_DATA {
6608    pub const ENCODED_LEN: usize = 2usize;
6609    pub const DEFAULT: Self = Self {
6610        target_system: 0_u8,
6611        target_component: 0_u8,
6612    };
6613    #[cfg(feature = "arbitrary")]
6614    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6615        use arbitrary::{Arbitrary, Unstructured};
6616        let mut buf = [0u8; 1024];
6617        rng.fill_bytes(&mut buf);
6618        let mut unstructured = Unstructured::new(&buf);
6619        Self::arbitrary(&mut unstructured).unwrap_or_default()
6620    }
6621}
6622impl Default for LOG_REQUEST_END_DATA {
6623    fn default() -> Self {
6624        Self::DEFAULT.clone()
6625    }
6626}
6627impl MessageData for LOG_REQUEST_END_DATA {
6628    type Message = MavMessage;
6629    const ID: u32 = 122u32;
6630    const NAME: &'static str = "LOG_REQUEST_END";
6631    const EXTRA_CRC: u8 = 203u8;
6632    const ENCODED_LEN: usize = 2usize;
6633    fn deser(
6634        _version: MavlinkVersion,
6635        __input: &[u8],
6636    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6637        let avail_len = __input.len();
6638        let mut payload_buf = [0; Self::ENCODED_LEN];
6639        let mut buf = if avail_len < Self::ENCODED_LEN {
6640            payload_buf[0..avail_len].copy_from_slice(__input);
6641            Bytes::new(&payload_buf)
6642        } else {
6643            Bytes::new(__input)
6644        };
6645        let mut __struct = Self::default();
6646        __struct.target_system = buf.get_u8();
6647        __struct.target_component = buf.get_u8();
6648        Ok(__struct)
6649    }
6650    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6651        let mut __tmp = BytesMut::new(bytes);
6652        #[allow(clippy::absurd_extreme_comparisons)]
6653        #[allow(unused_comparisons)]
6654        if __tmp.remaining() < Self::ENCODED_LEN {
6655            panic!(
6656                "buffer is too small (need {} bytes, but got {})",
6657                Self::ENCODED_LEN,
6658                __tmp.remaining(),
6659            )
6660        }
6661        __tmp.put_u8(self.target_system);
6662        __tmp.put_u8(self.target_component);
6663        if matches!(version, MavlinkVersion::V2) {
6664            let len = __tmp.len();
6665            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6666        } else {
6667            __tmp.len()
6668        }
6669    }
6670}
6671#[doc = "id: 12901"]
6672#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
6673#[derive(Debug, Clone, PartialEq)]
6674#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6675#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6676pub struct OPEN_DRONE_ID_LOCATION_DATA {
6677    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
6678    pub latitude: i32,
6679    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
6680    pub longitude: i32,
6681    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
6682    pub altitude_barometric: f32,
6683    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
6684    pub altitude_geodetic: f32,
6685    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
6686    pub height: f32,
6687    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
6688    pub timestamp: f32,
6689    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
6690    pub direction: u16,
6691    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
6692    pub speed_horizontal: u16,
6693    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
6694    pub speed_vertical: i16,
6695    #[doc = "System ID (0 for broadcast)."]
6696    pub target_system: u8,
6697    #[doc = "Component ID (0 for broadcast)."]
6698    pub target_component: u8,
6699    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
6700    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6701    pub id_or_mac: [u8; 20],
6702    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
6703    pub status: MavOdidStatus,
6704    #[doc = "Indicates the reference point for the height field."]
6705    pub height_reference: MavOdidHeightRef,
6706    #[doc = "The accuracy of the horizontal position."]
6707    pub horizontal_accuracy: MavOdidHorAcc,
6708    #[doc = "The accuracy of the vertical position."]
6709    pub vertical_accuracy: MavOdidVerAcc,
6710    #[doc = "The accuracy of the barometric altitude."]
6711    pub barometer_accuracy: MavOdidVerAcc,
6712    #[doc = "The accuracy of the horizontal and vertical speed."]
6713    pub speed_accuracy: MavOdidSpeedAcc,
6714    #[doc = "The accuracy of the timestamps."]
6715    pub timestamp_accuracy: MavOdidTimeAcc,
6716}
6717impl OPEN_DRONE_ID_LOCATION_DATA {
6718    pub const ENCODED_LEN: usize = 59usize;
6719    pub const DEFAULT: Self = Self {
6720        latitude: 0_i32,
6721        longitude: 0_i32,
6722        altitude_barometric: 0.0_f32,
6723        altitude_geodetic: 0.0_f32,
6724        height: 0.0_f32,
6725        timestamp: 0.0_f32,
6726        direction: 0_u16,
6727        speed_horizontal: 0_u16,
6728        speed_vertical: 0_i16,
6729        target_system: 0_u8,
6730        target_component: 0_u8,
6731        id_or_mac: [0_u8; 20usize],
6732        status: MavOdidStatus::DEFAULT,
6733        height_reference: MavOdidHeightRef::DEFAULT,
6734        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
6735        vertical_accuracy: MavOdidVerAcc::DEFAULT,
6736        barometer_accuracy: MavOdidVerAcc::DEFAULT,
6737        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
6738        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
6739    };
6740    #[cfg(feature = "arbitrary")]
6741    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6742        use arbitrary::{Arbitrary, Unstructured};
6743        let mut buf = [0u8; 1024];
6744        rng.fill_bytes(&mut buf);
6745        let mut unstructured = Unstructured::new(&buf);
6746        Self::arbitrary(&mut unstructured).unwrap_or_default()
6747    }
6748}
6749impl Default for OPEN_DRONE_ID_LOCATION_DATA {
6750    fn default() -> Self {
6751        Self::DEFAULT.clone()
6752    }
6753}
6754impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
6755    type Message = MavMessage;
6756    const ID: u32 = 12901u32;
6757    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
6758    const EXTRA_CRC: u8 = 254u8;
6759    const ENCODED_LEN: usize = 59usize;
6760    fn deser(
6761        _version: MavlinkVersion,
6762        __input: &[u8],
6763    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6764        let avail_len = __input.len();
6765        let mut payload_buf = [0; Self::ENCODED_LEN];
6766        let mut buf = if avail_len < Self::ENCODED_LEN {
6767            payload_buf[0..avail_len].copy_from_slice(__input);
6768            Bytes::new(&payload_buf)
6769        } else {
6770            Bytes::new(__input)
6771        };
6772        let mut __struct = Self::default();
6773        __struct.latitude = buf.get_i32_le();
6774        __struct.longitude = buf.get_i32_le();
6775        __struct.altitude_barometric = buf.get_f32_le();
6776        __struct.altitude_geodetic = buf.get_f32_le();
6777        __struct.height = buf.get_f32_le();
6778        __struct.timestamp = buf.get_f32_le();
6779        __struct.direction = buf.get_u16_le();
6780        __struct.speed_horizontal = buf.get_u16_le();
6781        __struct.speed_vertical = buf.get_i16_le();
6782        __struct.target_system = buf.get_u8();
6783        __struct.target_component = buf.get_u8();
6784        for v in &mut __struct.id_or_mac {
6785            let val = buf.get_u8();
6786            *v = val;
6787        }
6788        let tmp = buf.get_u8();
6789        __struct.status =
6790            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6791                enum_type: "MavOdidStatus",
6792                value: tmp as u32,
6793            })?;
6794        let tmp = buf.get_u8();
6795        __struct.height_reference =
6796            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6797                enum_type: "MavOdidHeightRef",
6798                value: tmp as u32,
6799            })?;
6800        let tmp = buf.get_u8();
6801        __struct.horizontal_accuracy =
6802            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6803                enum_type: "MavOdidHorAcc",
6804                value: tmp as u32,
6805            })?;
6806        let tmp = buf.get_u8();
6807        __struct.vertical_accuracy =
6808            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6809                enum_type: "MavOdidVerAcc",
6810                value: tmp as u32,
6811            })?;
6812        let tmp = buf.get_u8();
6813        __struct.barometer_accuracy =
6814            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6815                enum_type: "MavOdidVerAcc",
6816                value: tmp as u32,
6817            })?;
6818        let tmp = buf.get_u8();
6819        __struct.speed_accuracy =
6820            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6821                enum_type: "MavOdidSpeedAcc",
6822                value: tmp as u32,
6823            })?;
6824        let tmp = buf.get_u8();
6825        __struct.timestamp_accuracy =
6826            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6827                enum_type: "MavOdidTimeAcc",
6828                value: tmp as u32,
6829            })?;
6830        Ok(__struct)
6831    }
6832    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6833        let mut __tmp = BytesMut::new(bytes);
6834        #[allow(clippy::absurd_extreme_comparisons)]
6835        #[allow(unused_comparisons)]
6836        if __tmp.remaining() < Self::ENCODED_LEN {
6837            panic!(
6838                "buffer is too small (need {} bytes, but got {})",
6839                Self::ENCODED_LEN,
6840                __tmp.remaining(),
6841            )
6842        }
6843        __tmp.put_i32_le(self.latitude);
6844        __tmp.put_i32_le(self.longitude);
6845        __tmp.put_f32_le(self.altitude_barometric);
6846        __tmp.put_f32_le(self.altitude_geodetic);
6847        __tmp.put_f32_le(self.height);
6848        __tmp.put_f32_le(self.timestamp);
6849        __tmp.put_u16_le(self.direction);
6850        __tmp.put_u16_le(self.speed_horizontal);
6851        __tmp.put_i16_le(self.speed_vertical);
6852        __tmp.put_u8(self.target_system);
6853        __tmp.put_u8(self.target_component);
6854        for val in &self.id_or_mac {
6855            __tmp.put_u8(*val);
6856        }
6857        __tmp.put_u8(self.status as u8);
6858        __tmp.put_u8(self.height_reference as u8);
6859        __tmp.put_u8(self.horizontal_accuracy as u8);
6860        __tmp.put_u8(self.vertical_accuracy as u8);
6861        __tmp.put_u8(self.barometer_accuracy as u8);
6862        __tmp.put_u8(self.speed_accuracy as u8);
6863        __tmp.put_u8(self.timestamp_accuracy as u8);
6864        if matches!(version, MavlinkVersion::V2) {
6865            let len = __tmp.len();
6866            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6867        } else {
6868            __tmp.len()
6869        }
6870    }
6871}
6872#[doc = "id: 60052"]
6873#[doc = "Drone IMU data. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
6874#[derive(Debug, Clone, PartialEq)]
6875#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6876#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6877pub struct AVSS_DRONE_IMU_DATA {
6878    #[doc = "Timestamp (time since FC boot)."]
6879    pub time_boot_ms: u32,
6880    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
6881    pub q1: f32,
6882    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
6883    pub q2: f32,
6884    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
6885    pub q3: f32,
6886    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
6887    pub q4: f32,
6888    #[doc = "X acceleration"]
6889    pub xacc: f32,
6890    #[doc = "Y acceleration"]
6891    pub yacc: f32,
6892    #[doc = "Z acceleration"]
6893    pub zacc: f32,
6894    #[doc = "Angular speed around X axis"]
6895    pub xgyro: f32,
6896    #[doc = "Angular speed around Y axis"]
6897    pub ygyro: f32,
6898    #[doc = "Angular speed around Z axis"]
6899    pub zgyro: f32,
6900}
6901impl AVSS_DRONE_IMU_DATA {
6902    pub const ENCODED_LEN: usize = 44usize;
6903    pub const DEFAULT: Self = Self {
6904        time_boot_ms: 0_u32,
6905        q1: 0.0_f32,
6906        q2: 0.0_f32,
6907        q3: 0.0_f32,
6908        q4: 0.0_f32,
6909        xacc: 0.0_f32,
6910        yacc: 0.0_f32,
6911        zacc: 0.0_f32,
6912        xgyro: 0.0_f32,
6913        ygyro: 0.0_f32,
6914        zgyro: 0.0_f32,
6915    };
6916    #[cfg(feature = "arbitrary")]
6917    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6918        use arbitrary::{Arbitrary, Unstructured};
6919        let mut buf = [0u8; 1024];
6920        rng.fill_bytes(&mut buf);
6921        let mut unstructured = Unstructured::new(&buf);
6922        Self::arbitrary(&mut unstructured).unwrap_or_default()
6923    }
6924}
6925impl Default for AVSS_DRONE_IMU_DATA {
6926    fn default() -> Self {
6927        Self::DEFAULT.clone()
6928    }
6929}
6930impl MessageData for AVSS_DRONE_IMU_DATA {
6931    type Message = MavMessage;
6932    const ID: u32 = 60052u32;
6933    const NAME: &'static str = "AVSS_DRONE_IMU";
6934    const EXTRA_CRC: u8 = 101u8;
6935    const ENCODED_LEN: usize = 44usize;
6936    fn deser(
6937        _version: MavlinkVersion,
6938        __input: &[u8],
6939    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6940        let avail_len = __input.len();
6941        let mut payload_buf = [0; Self::ENCODED_LEN];
6942        let mut buf = if avail_len < Self::ENCODED_LEN {
6943            payload_buf[0..avail_len].copy_from_slice(__input);
6944            Bytes::new(&payload_buf)
6945        } else {
6946            Bytes::new(__input)
6947        };
6948        let mut __struct = Self::default();
6949        __struct.time_boot_ms = buf.get_u32_le();
6950        __struct.q1 = buf.get_f32_le();
6951        __struct.q2 = buf.get_f32_le();
6952        __struct.q3 = buf.get_f32_le();
6953        __struct.q4 = buf.get_f32_le();
6954        __struct.xacc = buf.get_f32_le();
6955        __struct.yacc = buf.get_f32_le();
6956        __struct.zacc = buf.get_f32_le();
6957        __struct.xgyro = buf.get_f32_le();
6958        __struct.ygyro = buf.get_f32_le();
6959        __struct.zgyro = buf.get_f32_le();
6960        Ok(__struct)
6961    }
6962    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6963        let mut __tmp = BytesMut::new(bytes);
6964        #[allow(clippy::absurd_extreme_comparisons)]
6965        #[allow(unused_comparisons)]
6966        if __tmp.remaining() < Self::ENCODED_LEN {
6967            panic!(
6968                "buffer is too small (need {} bytes, but got {})",
6969                Self::ENCODED_LEN,
6970                __tmp.remaining(),
6971            )
6972        }
6973        __tmp.put_u32_le(self.time_boot_ms);
6974        __tmp.put_f32_le(self.q1);
6975        __tmp.put_f32_le(self.q2);
6976        __tmp.put_f32_le(self.q3);
6977        __tmp.put_f32_le(self.q4);
6978        __tmp.put_f32_le(self.xacc);
6979        __tmp.put_f32_le(self.yacc);
6980        __tmp.put_f32_le(self.zacc);
6981        __tmp.put_f32_le(self.xgyro);
6982        __tmp.put_f32_le(self.ygyro);
6983        __tmp.put_f32_le(self.zgyro);
6984        if matches!(version, MavlinkVersion::V2) {
6985            let len = __tmp.len();
6986            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6987        } else {
6988            __tmp.len()
6989        }
6990    }
6991}
6992#[doc = "id: 66"]
6993#[doc = "Request a data stream."]
6994#[derive(Debug, Clone, PartialEq)]
6995#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6996#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6997pub struct REQUEST_DATA_STREAM_DATA {
6998    #[doc = "The requested message rate"]
6999    pub req_message_rate: u16,
7000    #[doc = "The target requested to send the message stream."]
7001    pub target_system: u8,
7002    #[doc = "The target requested to send the message stream."]
7003    pub target_component: u8,
7004    #[doc = "The ID of the requested data stream"]
7005    pub req_stream_id: u8,
7006    #[doc = "1 to start sending, 0 to stop sending."]
7007    pub start_stop: u8,
7008}
7009impl REQUEST_DATA_STREAM_DATA {
7010    pub const ENCODED_LEN: usize = 6usize;
7011    pub const DEFAULT: Self = Self {
7012        req_message_rate: 0_u16,
7013        target_system: 0_u8,
7014        target_component: 0_u8,
7015        req_stream_id: 0_u8,
7016        start_stop: 0_u8,
7017    };
7018    #[cfg(feature = "arbitrary")]
7019    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7020        use arbitrary::{Arbitrary, Unstructured};
7021        let mut buf = [0u8; 1024];
7022        rng.fill_bytes(&mut buf);
7023        let mut unstructured = Unstructured::new(&buf);
7024        Self::arbitrary(&mut unstructured).unwrap_or_default()
7025    }
7026}
7027impl Default for REQUEST_DATA_STREAM_DATA {
7028    fn default() -> Self {
7029        Self::DEFAULT.clone()
7030    }
7031}
7032impl MessageData for REQUEST_DATA_STREAM_DATA {
7033    type Message = MavMessage;
7034    const ID: u32 = 66u32;
7035    const NAME: &'static str = "REQUEST_DATA_STREAM";
7036    const EXTRA_CRC: u8 = 148u8;
7037    const ENCODED_LEN: usize = 6usize;
7038    fn deser(
7039        _version: MavlinkVersion,
7040        __input: &[u8],
7041    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7042        let avail_len = __input.len();
7043        let mut payload_buf = [0; Self::ENCODED_LEN];
7044        let mut buf = if avail_len < Self::ENCODED_LEN {
7045            payload_buf[0..avail_len].copy_from_slice(__input);
7046            Bytes::new(&payload_buf)
7047        } else {
7048            Bytes::new(__input)
7049        };
7050        let mut __struct = Self::default();
7051        __struct.req_message_rate = buf.get_u16_le();
7052        __struct.target_system = buf.get_u8();
7053        __struct.target_component = buf.get_u8();
7054        __struct.req_stream_id = buf.get_u8();
7055        __struct.start_stop = buf.get_u8();
7056        Ok(__struct)
7057    }
7058    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7059        let mut __tmp = BytesMut::new(bytes);
7060        #[allow(clippy::absurd_extreme_comparisons)]
7061        #[allow(unused_comparisons)]
7062        if __tmp.remaining() < Self::ENCODED_LEN {
7063            panic!(
7064                "buffer is too small (need {} bytes, but got {})",
7065                Self::ENCODED_LEN,
7066                __tmp.remaining(),
7067            )
7068        }
7069        __tmp.put_u16_le(self.req_message_rate);
7070        __tmp.put_u8(self.target_system);
7071        __tmp.put_u8(self.target_component);
7072        __tmp.put_u8(self.req_stream_id);
7073        __tmp.put_u8(self.start_stop);
7074        if matches!(version, MavlinkVersion::V2) {
7075            let len = __tmp.len();
7076            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7077        } else {
7078            __tmp.len()
7079        }
7080    }
7081}
7082#[doc = "id: 243"]
7083#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
7084#[derive(Debug, Clone, PartialEq)]
7085#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7086#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7087pub struct SET_HOME_POSITION_DATA {
7088    #[doc = "Latitude (WGS84)"]
7089    pub latitude: i32,
7090    #[doc = "Longitude (WGS84)"]
7091    pub longitude: i32,
7092    #[doc = "Altitude (MSL). Positive for up."]
7093    pub altitude: i32,
7094    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
7095    pub x: f32,
7096    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
7097    pub y: f32,
7098    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
7099    pub z: f32,
7100    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
7101    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7102    pub q: [f32; 4],
7103    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
7104    pub approach_x: f32,
7105    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
7106    pub approach_y: f32,
7107    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
7108    pub approach_z: f32,
7109    #[doc = "System ID."]
7110    pub target_system: u8,
7111    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
7112    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7113    pub time_usec: u64,
7114}
7115impl SET_HOME_POSITION_DATA {
7116    pub const ENCODED_LEN: usize = 61usize;
7117    pub const DEFAULT: Self = Self {
7118        latitude: 0_i32,
7119        longitude: 0_i32,
7120        altitude: 0_i32,
7121        x: 0.0_f32,
7122        y: 0.0_f32,
7123        z: 0.0_f32,
7124        q: [0.0_f32; 4usize],
7125        approach_x: 0.0_f32,
7126        approach_y: 0.0_f32,
7127        approach_z: 0.0_f32,
7128        target_system: 0_u8,
7129        time_usec: 0_u64,
7130    };
7131    #[cfg(feature = "arbitrary")]
7132    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7133        use arbitrary::{Arbitrary, Unstructured};
7134        let mut buf = [0u8; 1024];
7135        rng.fill_bytes(&mut buf);
7136        let mut unstructured = Unstructured::new(&buf);
7137        Self::arbitrary(&mut unstructured).unwrap_or_default()
7138    }
7139}
7140impl Default for SET_HOME_POSITION_DATA {
7141    fn default() -> Self {
7142        Self::DEFAULT.clone()
7143    }
7144}
7145impl MessageData for SET_HOME_POSITION_DATA {
7146    type Message = MavMessage;
7147    const ID: u32 = 243u32;
7148    const NAME: &'static str = "SET_HOME_POSITION";
7149    const EXTRA_CRC: u8 = 85u8;
7150    const ENCODED_LEN: usize = 61usize;
7151    fn deser(
7152        _version: MavlinkVersion,
7153        __input: &[u8],
7154    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7155        let avail_len = __input.len();
7156        let mut payload_buf = [0; Self::ENCODED_LEN];
7157        let mut buf = if avail_len < Self::ENCODED_LEN {
7158            payload_buf[0..avail_len].copy_from_slice(__input);
7159            Bytes::new(&payload_buf)
7160        } else {
7161            Bytes::new(__input)
7162        };
7163        let mut __struct = Self::default();
7164        __struct.latitude = buf.get_i32_le();
7165        __struct.longitude = buf.get_i32_le();
7166        __struct.altitude = buf.get_i32_le();
7167        __struct.x = buf.get_f32_le();
7168        __struct.y = buf.get_f32_le();
7169        __struct.z = buf.get_f32_le();
7170        for v in &mut __struct.q {
7171            let val = buf.get_f32_le();
7172            *v = val;
7173        }
7174        __struct.approach_x = buf.get_f32_le();
7175        __struct.approach_y = buf.get_f32_le();
7176        __struct.approach_z = buf.get_f32_le();
7177        __struct.target_system = buf.get_u8();
7178        __struct.time_usec = buf.get_u64_le();
7179        Ok(__struct)
7180    }
7181    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7182        let mut __tmp = BytesMut::new(bytes);
7183        #[allow(clippy::absurd_extreme_comparisons)]
7184        #[allow(unused_comparisons)]
7185        if __tmp.remaining() < Self::ENCODED_LEN {
7186            panic!(
7187                "buffer is too small (need {} bytes, but got {})",
7188                Self::ENCODED_LEN,
7189                __tmp.remaining(),
7190            )
7191        }
7192        __tmp.put_i32_le(self.latitude);
7193        __tmp.put_i32_le(self.longitude);
7194        __tmp.put_i32_le(self.altitude);
7195        __tmp.put_f32_le(self.x);
7196        __tmp.put_f32_le(self.y);
7197        __tmp.put_f32_le(self.z);
7198        for val in &self.q {
7199            __tmp.put_f32_le(*val);
7200        }
7201        __tmp.put_f32_le(self.approach_x);
7202        __tmp.put_f32_le(self.approach_y);
7203        __tmp.put_f32_le(self.approach_z);
7204        __tmp.put_u8(self.target_system);
7205        __tmp.put_u64_le(self.time_usec);
7206        if matches!(version, MavlinkVersion::V2) {
7207            let len = __tmp.len();
7208            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7209        } else {
7210            __tmp.len()
7211        }
7212    }
7213}
7214#[doc = "id: 370"]
7215#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
7216#[derive(Debug, Clone, PartialEq)]
7217#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7218#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7219pub struct SMART_BATTERY_INFO_DATA {
7220    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
7221    pub capacity_full_specification: i32,
7222    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
7223    pub capacity_full: i32,
7224    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
7225    pub cycle_count: u16,
7226    #[doc = "Battery weight. 0: field not provided."]
7227    pub weight: u16,
7228    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
7229    pub discharge_minimum_voltage: u16,
7230    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
7231    pub charging_minimum_voltage: u16,
7232    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
7233    pub resting_minimum_voltage: u16,
7234    #[doc = "Battery ID"]
7235    pub id: u8,
7236    #[doc = "Function of the battery"]
7237    pub battery_function: MavBatteryFunction,
7238    #[doc = "Type (chemistry) of the battery"]
7239    pub mavtype: MavBatteryType,
7240    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
7241    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7242    pub serial_number: [u8; 16],
7243    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
7244    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7245    pub device_name: [u8; 50],
7246    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
7247    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7248    pub charging_maximum_voltage: u16,
7249    #[doc = "Number of battery cells in series. 0: field not provided."]
7250    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7251    pub cells_in_series: u8,
7252    #[doc = "Maximum pack discharge current. 0: field not provided."]
7253    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7254    pub discharge_maximum_current: u32,
7255    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
7256    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7257    pub discharge_maximum_burst_current: u32,
7258    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
7259    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7260    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7261    pub manufacture_date: [u8; 11],
7262}
7263impl SMART_BATTERY_INFO_DATA {
7264    pub const ENCODED_LEN: usize = 109usize;
7265    pub const DEFAULT: Self = Self {
7266        capacity_full_specification: 0_i32,
7267        capacity_full: 0_i32,
7268        cycle_count: 0_u16,
7269        weight: 0_u16,
7270        discharge_minimum_voltage: 0_u16,
7271        charging_minimum_voltage: 0_u16,
7272        resting_minimum_voltage: 0_u16,
7273        id: 0_u8,
7274        battery_function: MavBatteryFunction::DEFAULT,
7275        mavtype: MavBatteryType::DEFAULT,
7276        serial_number: [0_u8; 16usize],
7277        device_name: [0_u8; 50usize],
7278        charging_maximum_voltage: 0_u16,
7279        cells_in_series: 0_u8,
7280        discharge_maximum_current: 0_u32,
7281        discharge_maximum_burst_current: 0_u32,
7282        manufacture_date: [0_u8; 11usize],
7283    };
7284    #[cfg(feature = "arbitrary")]
7285    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7286        use arbitrary::{Arbitrary, Unstructured};
7287        let mut buf = [0u8; 1024];
7288        rng.fill_bytes(&mut buf);
7289        let mut unstructured = Unstructured::new(&buf);
7290        Self::arbitrary(&mut unstructured).unwrap_or_default()
7291    }
7292}
7293impl Default for SMART_BATTERY_INFO_DATA {
7294    fn default() -> Self {
7295        Self::DEFAULT.clone()
7296    }
7297}
7298impl MessageData for SMART_BATTERY_INFO_DATA {
7299    type Message = MavMessage;
7300    const ID: u32 = 370u32;
7301    const NAME: &'static str = "SMART_BATTERY_INFO";
7302    const EXTRA_CRC: u8 = 75u8;
7303    const ENCODED_LEN: usize = 109usize;
7304    fn deser(
7305        _version: MavlinkVersion,
7306        __input: &[u8],
7307    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7308        let avail_len = __input.len();
7309        let mut payload_buf = [0; Self::ENCODED_LEN];
7310        let mut buf = if avail_len < Self::ENCODED_LEN {
7311            payload_buf[0..avail_len].copy_from_slice(__input);
7312            Bytes::new(&payload_buf)
7313        } else {
7314            Bytes::new(__input)
7315        };
7316        let mut __struct = Self::default();
7317        __struct.capacity_full_specification = buf.get_i32_le();
7318        __struct.capacity_full = buf.get_i32_le();
7319        __struct.cycle_count = buf.get_u16_le();
7320        __struct.weight = buf.get_u16_le();
7321        __struct.discharge_minimum_voltage = buf.get_u16_le();
7322        __struct.charging_minimum_voltage = buf.get_u16_le();
7323        __struct.resting_minimum_voltage = buf.get_u16_le();
7324        __struct.id = buf.get_u8();
7325        let tmp = buf.get_u8();
7326        __struct.battery_function =
7327            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7328                enum_type: "MavBatteryFunction",
7329                value: tmp as u32,
7330            })?;
7331        let tmp = buf.get_u8();
7332        __struct.mavtype =
7333            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7334                enum_type: "MavBatteryType",
7335                value: tmp as u32,
7336            })?;
7337        for v in &mut __struct.serial_number {
7338            let val = buf.get_u8();
7339            *v = val;
7340        }
7341        for v in &mut __struct.device_name {
7342            let val = buf.get_u8();
7343            *v = val;
7344        }
7345        __struct.charging_maximum_voltage = buf.get_u16_le();
7346        __struct.cells_in_series = buf.get_u8();
7347        __struct.discharge_maximum_current = buf.get_u32_le();
7348        __struct.discharge_maximum_burst_current = buf.get_u32_le();
7349        for v in &mut __struct.manufacture_date {
7350            let val = buf.get_u8();
7351            *v = val;
7352        }
7353        Ok(__struct)
7354    }
7355    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7356        let mut __tmp = BytesMut::new(bytes);
7357        #[allow(clippy::absurd_extreme_comparisons)]
7358        #[allow(unused_comparisons)]
7359        if __tmp.remaining() < Self::ENCODED_LEN {
7360            panic!(
7361                "buffer is too small (need {} bytes, but got {})",
7362                Self::ENCODED_LEN,
7363                __tmp.remaining(),
7364            )
7365        }
7366        __tmp.put_i32_le(self.capacity_full_specification);
7367        __tmp.put_i32_le(self.capacity_full);
7368        __tmp.put_u16_le(self.cycle_count);
7369        __tmp.put_u16_le(self.weight);
7370        __tmp.put_u16_le(self.discharge_minimum_voltage);
7371        __tmp.put_u16_le(self.charging_minimum_voltage);
7372        __tmp.put_u16_le(self.resting_minimum_voltage);
7373        __tmp.put_u8(self.id);
7374        __tmp.put_u8(self.battery_function as u8);
7375        __tmp.put_u8(self.mavtype as u8);
7376        for val in &self.serial_number {
7377            __tmp.put_u8(*val);
7378        }
7379        for val in &self.device_name {
7380            __tmp.put_u8(*val);
7381        }
7382        __tmp.put_u16_le(self.charging_maximum_voltage);
7383        __tmp.put_u8(self.cells_in_series);
7384        __tmp.put_u32_le(self.discharge_maximum_current);
7385        __tmp.put_u32_le(self.discharge_maximum_burst_current);
7386        for val in &self.manufacture_date {
7387            __tmp.put_u8(*val);
7388        }
7389        if matches!(version, MavlinkVersion::V2) {
7390            let len = __tmp.len();
7391            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7392        } else {
7393            __tmp.len()
7394        }
7395    }
7396}
7397#[doc = "id: 440"]
7398#[doc = "Illuminator status."]
7399#[derive(Debug, Clone, PartialEq)]
7400#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7401#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7402pub struct ILLUMINATOR_STATUS_DATA {
7403    #[doc = "Time since the start-up of the illuminator in ms"]
7404    pub uptime_ms: u32,
7405    #[doc = "Errors"]
7406    pub error_status: IlluminatorErrorFlags,
7407    #[doc = "Illuminator brightness"]
7408    pub brightness: f32,
7409    #[doc = "Illuminator strobing period in seconds"]
7410    pub strobe_period: f32,
7411    #[doc = "Illuminator strobing duty cycle"]
7412    pub strobe_duty_cycle: f32,
7413    #[doc = "Temperature in Celsius"]
7414    pub temp_c: f32,
7415    #[doc = "Minimum strobing period in seconds"]
7416    pub min_strobe_period: f32,
7417    #[doc = "Maximum strobing period in seconds"]
7418    pub max_strobe_period: f32,
7419    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
7420    pub enable: u8,
7421    #[doc = "Supported illuminator modes"]
7422    pub mode_bitmask: IlluminatorMode,
7423    #[doc = "Illuminator mode"]
7424    pub mode: IlluminatorMode,
7425}
7426impl ILLUMINATOR_STATUS_DATA {
7427    pub const ENCODED_LEN: usize = 35usize;
7428    pub const DEFAULT: Self = Self {
7429        uptime_ms: 0_u32,
7430        error_status: IlluminatorErrorFlags::DEFAULT,
7431        brightness: 0.0_f32,
7432        strobe_period: 0.0_f32,
7433        strobe_duty_cycle: 0.0_f32,
7434        temp_c: 0.0_f32,
7435        min_strobe_period: 0.0_f32,
7436        max_strobe_period: 0.0_f32,
7437        enable: 0_u8,
7438        mode_bitmask: IlluminatorMode::DEFAULT,
7439        mode: IlluminatorMode::DEFAULT,
7440    };
7441    #[cfg(feature = "arbitrary")]
7442    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7443        use arbitrary::{Arbitrary, Unstructured};
7444        let mut buf = [0u8; 1024];
7445        rng.fill_bytes(&mut buf);
7446        let mut unstructured = Unstructured::new(&buf);
7447        Self::arbitrary(&mut unstructured).unwrap_or_default()
7448    }
7449}
7450impl Default for ILLUMINATOR_STATUS_DATA {
7451    fn default() -> Self {
7452        Self::DEFAULT.clone()
7453    }
7454}
7455impl MessageData for ILLUMINATOR_STATUS_DATA {
7456    type Message = MavMessage;
7457    const ID: u32 = 440u32;
7458    const NAME: &'static str = "ILLUMINATOR_STATUS";
7459    const EXTRA_CRC: u8 = 66u8;
7460    const ENCODED_LEN: usize = 35usize;
7461    fn deser(
7462        _version: MavlinkVersion,
7463        __input: &[u8],
7464    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7465        let avail_len = __input.len();
7466        let mut payload_buf = [0; Self::ENCODED_LEN];
7467        let mut buf = if avail_len < Self::ENCODED_LEN {
7468            payload_buf[0..avail_len].copy_from_slice(__input);
7469            Bytes::new(&payload_buf)
7470        } else {
7471            Bytes::new(__input)
7472        };
7473        let mut __struct = Self::default();
7474        __struct.uptime_ms = buf.get_u32_le();
7475        let tmp = buf.get_u32_le();
7476        __struct.error_status = IlluminatorErrorFlags::from_bits(
7477            tmp & IlluminatorErrorFlags::all().bits(),
7478        )
7479        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7480            flag_type: "IlluminatorErrorFlags",
7481            value: tmp as u32,
7482        })?;
7483        __struct.brightness = buf.get_f32_le();
7484        __struct.strobe_period = buf.get_f32_le();
7485        __struct.strobe_duty_cycle = buf.get_f32_le();
7486        __struct.temp_c = buf.get_f32_le();
7487        __struct.min_strobe_period = buf.get_f32_le();
7488        __struct.max_strobe_period = buf.get_f32_le();
7489        __struct.enable = buf.get_u8();
7490        let tmp = buf.get_u8();
7491        __struct.mode_bitmask =
7492            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7493                enum_type: "IlluminatorMode",
7494                value: tmp as u32,
7495            })?;
7496        let tmp = buf.get_u8();
7497        __struct.mode =
7498            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7499                enum_type: "IlluminatorMode",
7500                value: tmp as u32,
7501            })?;
7502        Ok(__struct)
7503    }
7504    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7505        let mut __tmp = BytesMut::new(bytes);
7506        #[allow(clippy::absurd_extreme_comparisons)]
7507        #[allow(unused_comparisons)]
7508        if __tmp.remaining() < Self::ENCODED_LEN {
7509            panic!(
7510                "buffer is too small (need {} bytes, but got {})",
7511                Self::ENCODED_LEN,
7512                __tmp.remaining(),
7513            )
7514        }
7515        __tmp.put_u32_le(self.uptime_ms);
7516        __tmp.put_u32_le(self.error_status.bits());
7517        __tmp.put_f32_le(self.brightness);
7518        __tmp.put_f32_le(self.strobe_period);
7519        __tmp.put_f32_le(self.strobe_duty_cycle);
7520        __tmp.put_f32_le(self.temp_c);
7521        __tmp.put_f32_le(self.min_strobe_period);
7522        __tmp.put_f32_le(self.max_strobe_period);
7523        __tmp.put_u8(self.enable);
7524        __tmp.put_u8(self.mode_bitmask as u8);
7525        __tmp.put_u8(self.mode as u8);
7526        if matches!(version, MavlinkVersion::V2) {
7527            let len = __tmp.len();
7528            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7529        } else {
7530            __tmp.len()
7531        }
7532    }
7533}
7534#[doc = "id: 261"]
7535#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
7536#[derive(Debug, Clone, PartialEq)]
7537#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7538#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7539pub struct STORAGE_INFORMATION_DATA {
7540    #[doc = "Timestamp (time since system boot)."]
7541    pub time_boot_ms: u32,
7542    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
7543    pub total_capacity: f32,
7544    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
7545    pub used_capacity: f32,
7546    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
7547    pub available_capacity: f32,
7548    #[doc = "Read speed."]
7549    pub read_speed: f32,
7550    #[doc = "Write speed."]
7551    pub write_speed: f32,
7552    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
7553    pub storage_id: u8,
7554    #[doc = "Number of storage devices"]
7555    pub storage_count: u8,
7556    #[doc = "Status of storage"]
7557    pub status: StorageStatus,
7558    #[doc = "Type of storage"]
7559    #[cfg_attr(feature = "serde", serde(default))]
7560    pub mavtype: StorageType,
7561    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
7562    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7563    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7564    pub name: [u8; 32],
7565    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
7566    #[cfg_attr(feature = "serde", serde(default))]
7567    pub storage_usage: StorageUsageFlag,
7568}
7569impl STORAGE_INFORMATION_DATA {
7570    pub const ENCODED_LEN: usize = 61usize;
7571    pub const DEFAULT: Self = Self {
7572        time_boot_ms: 0_u32,
7573        total_capacity: 0.0_f32,
7574        used_capacity: 0.0_f32,
7575        available_capacity: 0.0_f32,
7576        read_speed: 0.0_f32,
7577        write_speed: 0.0_f32,
7578        storage_id: 0_u8,
7579        storage_count: 0_u8,
7580        status: StorageStatus::DEFAULT,
7581        mavtype: StorageType::DEFAULT,
7582        name: [0_u8; 32usize],
7583        storage_usage: StorageUsageFlag::DEFAULT,
7584    };
7585    #[cfg(feature = "arbitrary")]
7586    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7587        use arbitrary::{Arbitrary, Unstructured};
7588        let mut buf = [0u8; 1024];
7589        rng.fill_bytes(&mut buf);
7590        let mut unstructured = Unstructured::new(&buf);
7591        Self::arbitrary(&mut unstructured).unwrap_or_default()
7592    }
7593}
7594impl Default for STORAGE_INFORMATION_DATA {
7595    fn default() -> Self {
7596        Self::DEFAULT.clone()
7597    }
7598}
7599impl MessageData for STORAGE_INFORMATION_DATA {
7600    type Message = MavMessage;
7601    const ID: u32 = 261u32;
7602    const NAME: &'static str = "STORAGE_INFORMATION";
7603    const EXTRA_CRC: u8 = 179u8;
7604    const ENCODED_LEN: usize = 61usize;
7605    fn deser(
7606        _version: MavlinkVersion,
7607        __input: &[u8],
7608    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7609        let avail_len = __input.len();
7610        let mut payload_buf = [0; Self::ENCODED_LEN];
7611        let mut buf = if avail_len < Self::ENCODED_LEN {
7612            payload_buf[0..avail_len].copy_from_slice(__input);
7613            Bytes::new(&payload_buf)
7614        } else {
7615            Bytes::new(__input)
7616        };
7617        let mut __struct = Self::default();
7618        __struct.time_boot_ms = buf.get_u32_le();
7619        __struct.total_capacity = buf.get_f32_le();
7620        __struct.used_capacity = buf.get_f32_le();
7621        __struct.available_capacity = buf.get_f32_le();
7622        __struct.read_speed = buf.get_f32_le();
7623        __struct.write_speed = buf.get_f32_le();
7624        __struct.storage_id = buf.get_u8();
7625        __struct.storage_count = buf.get_u8();
7626        let tmp = buf.get_u8();
7627        __struct.status =
7628            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7629                enum_type: "StorageStatus",
7630                value: tmp as u32,
7631            })?;
7632        let tmp = buf.get_u8();
7633        __struct.mavtype =
7634            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7635                enum_type: "StorageType",
7636                value: tmp as u32,
7637            })?;
7638        for v in &mut __struct.name {
7639            let val = buf.get_u8();
7640            *v = val;
7641        }
7642        let tmp = buf.get_u8();
7643        __struct.storage_usage = StorageUsageFlag::from_bits(tmp & StorageUsageFlag::all().bits())
7644            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7645                flag_type: "StorageUsageFlag",
7646                value: tmp as u32,
7647            })?;
7648        Ok(__struct)
7649    }
7650    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7651        let mut __tmp = BytesMut::new(bytes);
7652        #[allow(clippy::absurd_extreme_comparisons)]
7653        #[allow(unused_comparisons)]
7654        if __tmp.remaining() < Self::ENCODED_LEN {
7655            panic!(
7656                "buffer is too small (need {} bytes, but got {})",
7657                Self::ENCODED_LEN,
7658                __tmp.remaining(),
7659            )
7660        }
7661        __tmp.put_u32_le(self.time_boot_ms);
7662        __tmp.put_f32_le(self.total_capacity);
7663        __tmp.put_f32_le(self.used_capacity);
7664        __tmp.put_f32_le(self.available_capacity);
7665        __tmp.put_f32_le(self.read_speed);
7666        __tmp.put_f32_le(self.write_speed);
7667        __tmp.put_u8(self.storage_id);
7668        __tmp.put_u8(self.storage_count);
7669        __tmp.put_u8(self.status as u8);
7670        __tmp.put_u8(self.mavtype as u8);
7671        for val in &self.name {
7672            __tmp.put_u8(*val);
7673        }
7674        __tmp.put_u8(self.storage_usage.bits());
7675        if matches!(version, MavlinkVersion::V2) {
7676            let len = __tmp.len();
7677            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7678        } else {
7679            __tmp.len()
7680        }
7681    }
7682}
7683#[doc = "id: 320"]
7684#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
7685#[derive(Debug, Clone, PartialEq)]
7686#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7687#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7688pub struct PARAM_EXT_REQUEST_READ_DATA {
7689    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
7690    pub param_index: i16,
7691    #[doc = "System ID"]
7692    pub target_system: u8,
7693    #[doc = "Component ID"]
7694    pub target_component: u8,
7695    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
7696    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7697    pub param_id: [u8; 16],
7698}
7699impl PARAM_EXT_REQUEST_READ_DATA {
7700    pub const ENCODED_LEN: usize = 20usize;
7701    pub const DEFAULT: Self = Self {
7702        param_index: 0_i16,
7703        target_system: 0_u8,
7704        target_component: 0_u8,
7705        param_id: [0_u8; 16usize],
7706    };
7707    #[cfg(feature = "arbitrary")]
7708    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7709        use arbitrary::{Arbitrary, Unstructured};
7710        let mut buf = [0u8; 1024];
7711        rng.fill_bytes(&mut buf);
7712        let mut unstructured = Unstructured::new(&buf);
7713        Self::arbitrary(&mut unstructured).unwrap_or_default()
7714    }
7715}
7716impl Default for PARAM_EXT_REQUEST_READ_DATA {
7717    fn default() -> Self {
7718        Self::DEFAULT.clone()
7719    }
7720}
7721impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
7722    type Message = MavMessage;
7723    const ID: u32 = 320u32;
7724    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
7725    const EXTRA_CRC: u8 = 243u8;
7726    const ENCODED_LEN: usize = 20usize;
7727    fn deser(
7728        _version: MavlinkVersion,
7729        __input: &[u8],
7730    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7731        let avail_len = __input.len();
7732        let mut payload_buf = [0; Self::ENCODED_LEN];
7733        let mut buf = if avail_len < Self::ENCODED_LEN {
7734            payload_buf[0..avail_len].copy_from_slice(__input);
7735            Bytes::new(&payload_buf)
7736        } else {
7737            Bytes::new(__input)
7738        };
7739        let mut __struct = Self::default();
7740        __struct.param_index = buf.get_i16_le();
7741        __struct.target_system = buf.get_u8();
7742        __struct.target_component = buf.get_u8();
7743        for v in &mut __struct.param_id {
7744            let val = buf.get_u8();
7745            *v = val;
7746        }
7747        Ok(__struct)
7748    }
7749    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7750        let mut __tmp = BytesMut::new(bytes);
7751        #[allow(clippy::absurd_extreme_comparisons)]
7752        #[allow(unused_comparisons)]
7753        if __tmp.remaining() < Self::ENCODED_LEN {
7754            panic!(
7755                "buffer is too small (need {} bytes, but got {})",
7756                Self::ENCODED_LEN,
7757                __tmp.remaining(),
7758            )
7759        }
7760        __tmp.put_i16_le(self.param_index);
7761        __tmp.put_u8(self.target_system);
7762        __tmp.put_u8(self.target_component);
7763        for val in &self.param_id {
7764            __tmp.put_u8(*val);
7765        }
7766        if matches!(version, MavlinkVersion::V2) {
7767            let len = __tmp.len();
7768            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7769        } else {
7770            __tmp.len()
7771        }
7772    }
7773}
7774#[doc = "id: 129"]
7775#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
7776#[derive(Debug, Clone, PartialEq)]
7777#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7778#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7779pub struct SCALED_IMU3_DATA {
7780    #[doc = "Timestamp (time since system boot)."]
7781    pub time_boot_ms: u32,
7782    #[doc = "X acceleration"]
7783    pub xacc: i16,
7784    #[doc = "Y acceleration"]
7785    pub yacc: i16,
7786    #[doc = "Z acceleration"]
7787    pub zacc: i16,
7788    #[doc = "Angular speed around X axis"]
7789    pub xgyro: i16,
7790    #[doc = "Angular speed around Y axis"]
7791    pub ygyro: i16,
7792    #[doc = "Angular speed around Z axis"]
7793    pub zgyro: i16,
7794    #[doc = "X Magnetic field"]
7795    pub xmag: i16,
7796    #[doc = "Y Magnetic field"]
7797    pub ymag: i16,
7798    #[doc = "Z Magnetic field"]
7799    pub zmag: i16,
7800    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
7801    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7802    pub temperature: i16,
7803}
7804impl SCALED_IMU3_DATA {
7805    pub const ENCODED_LEN: usize = 24usize;
7806    pub const DEFAULT: Self = Self {
7807        time_boot_ms: 0_u32,
7808        xacc: 0_i16,
7809        yacc: 0_i16,
7810        zacc: 0_i16,
7811        xgyro: 0_i16,
7812        ygyro: 0_i16,
7813        zgyro: 0_i16,
7814        xmag: 0_i16,
7815        ymag: 0_i16,
7816        zmag: 0_i16,
7817        temperature: 0_i16,
7818    };
7819    #[cfg(feature = "arbitrary")]
7820    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7821        use arbitrary::{Arbitrary, Unstructured};
7822        let mut buf = [0u8; 1024];
7823        rng.fill_bytes(&mut buf);
7824        let mut unstructured = Unstructured::new(&buf);
7825        Self::arbitrary(&mut unstructured).unwrap_or_default()
7826    }
7827}
7828impl Default for SCALED_IMU3_DATA {
7829    fn default() -> Self {
7830        Self::DEFAULT.clone()
7831    }
7832}
7833impl MessageData for SCALED_IMU3_DATA {
7834    type Message = MavMessage;
7835    const ID: u32 = 129u32;
7836    const NAME: &'static str = "SCALED_IMU3";
7837    const EXTRA_CRC: u8 = 46u8;
7838    const ENCODED_LEN: usize = 24usize;
7839    fn deser(
7840        _version: MavlinkVersion,
7841        __input: &[u8],
7842    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7843        let avail_len = __input.len();
7844        let mut payload_buf = [0; Self::ENCODED_LEN];
7845        let mut buf = if avail_len < Self::ENCODED_LEN {
7846            payload_buf[0..avail_len].copy_from_slice(__input);
7847            Bytes::new(&payload_buf)
7848        } else {
7849            Bytes::new(__input)
7850        };
7851        let mut __struct = Self::default();
7852        __struct.time_boot_ms = buf.get_u32_le();
7853        __struct.xacc = buf.get_i16_le();
7854        __struct.yacc = buf.get_i16_le();
7855        __struct.zacc = buf.get_i16_le();
7856        __struct.xgyro = buf.get_i16_le();
7857        __struct.ygyro = buf.get_i16_le();
7858        __struct.zgyro = buf.get_i16_le();
7859        __struct.xmag = buf.get_i16_le();
7860        __struct.ymag = buf.get_i16_le();
7861        __struct.zmag = buf.get_i16_le();
7862        __struct.temperature = buf.get_i16_le();
7863        Ok(__struct)
7864    }
7865    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7866        let mut __tmp = BytesMut::new(bytes);
7867        #[allow(clippy::absurd_extreme_comparisons)]
7868        #[allow(unused_comparisons)]
7869        if __tmp.remaining() < Self::ENCODED_LEN {
7870            panic!(
7871                "buffer is too small (need {} bytes, but got {})",
7872                Self::ENCODED_LEN,
7873                __tmp.remaining(),
7874            )
7875        }
7876        __tmp.put_u32_le(self.time_boot_ms);
7877        __tmp.put_i16_le(self.xacc);
7878        __tmp.put_i16_le(self.yacc);
7879        __tmp.put_i16_le(self.zacc);
7880        __tmp.put_i16_le(self.xgyro);
7881        __tmp.put_i16_le(self.ygyro);
7882        __tmp.put_i16_le(self.zgyro);
7883        __tmp.put_i16_le(self.xmag);
7884        __tmp.put_i16_le(self.ymag);
7885        __tmp.put_i16_le(self.zmag);
7886        __tmp.put_i16_le(self.temperature);
7887        if matches!(version, MavlinkVersion::V2) {
7888            let len = __tmp.len();
7889            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7890        } else {
7891            __tmp.len()
7892        }
7893    }
7894}
7895#[doc = "id: 244"]
7896#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
7897#[derive(Debug, Clone, PartialEq)]
7898#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7899#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7900pub struct MESSAGE_INTERVAL_DATA {
7901    #[doc = "0 indicates the interval at which it is sent."]
7902    pub interval_us: i32,
7903    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
7904    pub message_id: u16,
7905}
7906impl MESSAGE_INTERVAL_DATA {
7907    pub const ENCODED_LEN: usize = 6usize;
7908    pub const DEFAULT: Self = Self {
7909        interval_us: 0_i32,
7910        message_id: 0_u16,
7911    };
7912    #[cfg(feature = "arbitrary")]
7913    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7914        use arbitrary::{Arbitrary, Unstructured};
7915        let mut buf = [0u8; 1024];
7916        rng.fill_bytes(&mut buf);
7917        let mut unstructured = Unstructured::new(&buf);
7918        Self::arbitrary(&mut unstructured).unwrap_or_default()
7919    }
7920}
7921impl Default for MESSAGE_INTERVAL_DATA {
7922    fn default() -> Self {
7923        Self::DEFAULT.clone()
7924    }
7925}
7926impl MessageData for MESSAGE_INTERVAL_DATA {
7927    type Message = MavMessage;
7928    const ID: u32 = 244u32;
7929    const NAME: &'static str = "MESSAGE_INTERVAL";
7930    const EXTRA_CRC: u8 = 95u8;
7931    const ENCODED_LEN: usize = 6usize;
7932    fn deser(
7933        _version: MavlinkVersion,
7934        __input: &[u8],
7935    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7936        let avail_len = __input.len();
7937        let mut payload_buf = [0; Self::ENCODED_LEN];
7938        let mut buf = if avail_len < Self::ENCODED_LEN {
7939            payload_buf[0..avail_len].copy_from_slice(__input);
7940            Bytes::new(&payload_buf)
7941        } else {
7942            Bytes::new(__input)
7943        };
7944        let mut __struct = Self::default();
7945        __struct.interval_us = buf.get_i32_le();
7946        __struct.message_id = buf.get_u16_le();
7947        Ok(__struct)
7948    }
7949    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7950        let mut __tmp = BytesMut::new(bytes);
7951        #[allow(clippy::absurd_extreme_comparisons)]
7952        #[allow(unused_comparisons)]
7953        if __tmp.remaining() < Self::ENCODED_LEN {
7954            panic!(
7955                "buffer is too small (need {} bytes, but got {})",
7956                Self::ENCODED_LEN,
7957                __tmp.remaining(),
7958            )
7959        }
7960        __tmp.put_i32_le(self.interval_us);
7961        __tmp.put_u16_le(self.message_id);
7962        if matches!(version, MavlinkVersion::V2) {
7963            let len = __tmp.len();
7964            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7965        } else {
7966            __tmp.len()
7967        }
7968    }
7969}
7970#[doc = "id: 6"]
7971#[doc = "Accept / deny control of this MAV."]
7972#[derive(Debug, Clone, PartialEq)]
7973#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7974#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7975pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
7976    #[doc = "ID of the GCS this message"]
7977    pub gcs_system_id: u8,
7978    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
7979    pub control_request: u8,
7980    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
7981    pub ack: u8,
7982}
7983impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
7984    pub const ENCODED_LEN: usize = 3usize;
7985    pub const DEFAULT: Self = Self {
7986        gcs_system_id: 0_u8,
7987        control_request: 0_u8,
7988        ack: 0_u8,
7989    };
7990    #[cfg(feature = "arbitrary")]
7991    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7992        use arbitrary::{Arbitrary, Unstructured};
7993        let mut buf = [0u8; 1024];
7994        rng.fill_bytes(&mut buf);
7995        let mut unstructured = Unstructured::new(&buf);
7996        Self::arbitrary(&mut unstructured).unwrap_or_default()
7997    }
7998}
7999impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8000    fn default() -> Self {
8001        Self::DEFAULT.clone()
8002    }
8003}
8004impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8005    type Message = MavMessage;
8006    const ID: u32 = 6u32;
8007    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
8008    const EXTRA_CRC: u8 = 104u8;
8009    const ENCODED_LEN: usize = 3usize;
8010    fn deser(
8011        _version: MavlinkVersion,
8012        __input: &[u8],
8013    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8014        let avail_len = __input.len();
8015        let mut payload_buf = [0; Self::ENCODED_LEN];
8016        let mut buf = if avail_len < Self::ENCODED_LEN {
8017            payload_buf[0..avail_len].copy_from_slice(__input);
8018            Bytes::new(&payload_buf)
8019        } else {
8020            Bytes::new(__input)
8021        };
8022        let mut __struct = Self::default();
8023        __struct.gcs_system_id = buf.get_u8();
8024        __struct.control_request = buf.get_u8();
8025        __struct.ack = buf.get_u8();
8026        Ok(__struct)
8027    }
8028    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8029        let mut __tmp = BytesMut::new(bytes);
8030        #[allow(clippy::absurd_extreme_comparisons)]
8031        #[allow(unused_comparisons)]
8032        if __tmp.remaining() < Self::ENCODED_LEN {
8033            panic!(
8034                "buffer is too small (need {} bytes, but got {})",
8035                Self::ENCODED_LEN,
8036                __tmp.remaining(),
8037            )
8038        }
8039        __tmp.put_u8(self.gcs_system_id);
8040        __tmp.put_u8(self.control_request);
8041        __tmp.put_u8(self.ack);
8042        if matches!(version, MavlinkVersion::V2) {
8043            let len = __tmp.len();
8044            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8045        } else {
8046            __tmp.len()
8047        }
8048    }
8049}
8050#[doc = "id: 232"]
8051#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
8052#[derive(Debug, Clone, PartialEq)]
8053#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8054#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8055pub struct GPS_INPUT_DATA {
8056    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
8057    pub time_usec: u64,
8058    #[doc = "GPS time (from start of GPS week)"]
8059    pub time_week_ms: u32,
8060    #[doc = "Latitude (WGS84)"]
8061    pub lat: i32,
8062    #[doc = "Longitude (WGS84)"]
8063    pub lon: i32,
8064    #[doc = "Altitude (MSL). Positive for up."]
8065    pub alt: f32,
8066    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
8067    pub hdop: f32,
8068    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
8069    pub vdop: f32,
8070    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
8071    pub vn: f32,
8072    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
8073    pub ve: f32,
8074    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
8075    pub vd: f32,
8076    #[doc = "GPS speed accuracy"]
8077    pub speed_accuracy: f32,
8078    #[doc = "GPS horizontal accuracy"]
8079    pub horiz_accuracy: f32,
8080    #[doc = "GPS vertical accuracy"]
8081    pub vert_accuracy: f32,
8082    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
8083    pub ignore_flags: GpsInputIgnoreFlags,
8084    #[doc = "GPS week number"]
8085    pub time_week: u16,
8086    #[doc = "ID of the GPS for multiple GPS inputs"]
8087    pub gps_id: u8,
8088    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
8089    pub fix_type: u8,
8090    #[doc = "Number of satellites visible."]
8091    pub satellites_visible: u8,
8092    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
8093    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8094    pub yaw: u16,
8095}
8096impl GPS_INPUT_DATA {
8097    pub const ENCODED_LEN: usize = 65usize;
8098    pub const DEFAULT: Self = Self {
8099        time_usec: 0_u64,
8100        time_week_ms: 0_u32,
8101        lat: 0_i32,
8102        lon: 0_i32,
8103        alt: 0.0_f32,
8104        hdop: 0.0_f32,
8105        vdop: 0.0_f32,
8106        vn: 0.0_f32,
8107        ve: 0.0_f32,
8108        vd: 0.0_f32,
8109        speed_accuracy: 0.0_f32,
8110        horiz_accuracy: 0.0_f32,
8111        vert_accuracy: 0.0_f32,
8112        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
8113        time_week: 0_u16,
8114        gps_id: 0_u8,
8115        fix_type: 0_u8,
8116        satellites_visible: 0_u8,
8117        yaw: 0_u16,
8118    };
8119    #[cfg(feature = "arbitrary")]
8120    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8121        use arbitrary::{Arbitrary, Unstructured};
8122        let mut buf = [0u8; 1024];
8123        rng.fill_bytes(&mut buf);
8124        let mut unstructured = Unstructured::new(&buf);
8125        Self::arbitrary(&mut unstructured).unwrap_or_default()
8126    }
8127}
8128impl Default for GPS_INPUT_DATA {
8129    fn default() -> Self {
8130        Self::DEFAULT.clone()
8131    }
8132}
8133impl MessageData for GPS_INPUT_DATA {
8134    type Message = MavMessage;
8135    const ID: u32 = 232u32;
8136    const NAME: &'static str = "GPS_INPUT";
8137    const EXTRA_CRC: u8 = 151u8;
8138    const ENCODED_LEN: usize = 65usize;
8139    fn deser(
8140        _version: MavlinkVersion,
8141        __input: &[u8],
8142    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8143        let avail_len = __input.len();
8144        let mut payload_buf = [0; Self::ENCODED_LEN];
8145        let mut buf = if avail_len < Self::ENCODED_LEN {
8146            payload_buf[0..avail_len].copy_from_slice(__input);
8147            Bytes::new(&payload_buf)
8148        } else {
8149            Bytes::new(__input)
8150        };
8151        let mut __struct = Self::default();
8152        __struct.time_usec = buf.get_u64_le();
8153        __struct.time_week_ms = buf.get_u32_le();
8154        __struct.lat = buf.get_i32_le();
8155        __struct.lon = buf.get_i32_le();
8156        __struct.alt = buf.get_f32_le();
8157        __struct.hdop = buf.get_f32_le();
8158        __struct.vdop = buf.get_f32_le();
8159        __struct.vn = buf.get_f32_le();
8160        __struct.ve = buf.get_f32_le();
8161        __struct.vd = buf.get_f32_le();
8162        __struct.speed_accuracy = buf.get_f32_le();
8163        __struct.horiz_accuracy = buf.get_f32_le();
8164        __struct.vert_accuracy = buf.get_f32_le();
8165        let tmp = buf.get_u16_le();
8166        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
8167            tmp & GpsInputIgnoreFlags::all().bits(),
8168        )
8169        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
8170            flag_type: "GpsInputIgnoreFlags",
8171            value: tmp as u32,
8172        })?;
8173        __struct.time_week = buf.get_u16_le();
8174        __struct.gps_id = buf.get_u8();
8175        __struct.fix_type = buf.get_u8();
8176        __struct.satellites_visible = buf.get_u8();
8177        __struct.yaw = buf.get_u16_le();
8178        Ok(__struct)
8179    }
8180    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8181        let mut __tmp = BytesMut::new(bytes);
8182        #[allow(clippy::absurd_extreme_comparisons)]
8183        #[allow(unused_comparisons)]
8184        if __tmp.remaining() < Self::ENCODED_LEN {
8185            panic!(
8186                "buffer is too small (need {} bytes, but got {})",
8187                Self::ENCODED_LEN,
8188                __tmp.remaining(),
8189            )
8190        }
8191        __tmp.put_u64_le(self.time_usec);
8192        __tmp.put_u32_le(self.time_week_ms);
8193        __tmp.put_i32_le(self.lat);
8194        __tmp.put_i32_le(self.lon);
8195        __tmp.put_f32_le(self.alt);
8196        __tmp.put_f32_le(self.hdop);
8197        __tmp.put_f32_le(self.vdop);
8198        __tmp.put_f32_le(self.vn);
8199        __tmp.put_f32_le(self.ve);
8200        __tmp.put_f32_le(self.vd);
8201        __tmp.put_f32_le(self.speed_accuracy);
8202        __tmp.put_f32_le(self.horiz_accuracy);
8203        __tmp.put_f32_le(self.vert_accuracy);
8204        __tmp.put_u16_le(self.ignore_flags.bits());
8205        __tmp.put_u16_le(self.time_week);
8206        __tmp.put_u8(self.gps_id);
8207        __tmp.put_u8(self.fix_type);
8208        __tmp.put_u8(self.satellites_visible);
8209        __tmp.put_u16_le(self.yaw);
8210        if matches!(version, MavlinkVersion::V2) {
8211            let len = __tmp.len();
8212            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8213        } else {
8214            __tmp.len()
8215        }
8216    }
8217}
8218#[doc = "id: 324"]
8219#[doc = "Response from a PARAM_EXT_SET message."]
8220#[derive(Debug, Clone, PartialEq)]
8221#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8222#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8223pub struct PARAM_EXT_ACK_DATA {
8224    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
8225    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8226    pub param_id: [u8; 16],
8227    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
8228    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8229    pub param_value: [u8; 128],
8230    #[doc = "Parameter type."]
8231    pub param_type: MavParamExtType,
8232    #[doc = "Result code."]
8233    pub param_result: ParamAck,
8234}
8235impl PARAM_EXT_ACK_DATA {
8236    pub const ENCODED_LEN: usize = 146usize;
8237    pub const DEFAULT: Self = Self {
8238        param_id: [0_u8; 16usize],
8239        param_value: [0_u8; 128usize],
8240        param_type: MavParamExtType::DEFAULT,
8241        param_result: ParamAck::DEFAULT,
8242    };
8243    #[cfg(feature = "arbitrary")]
8244    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8245        use arbitrary::{Arbitrary, Unstructured};
8246        let mut buf = [0u8; 1024];
8247        rng.fill_bytes(&mut buf);
8248        let mut unstructured = Unstructured::new(&buf);
8249        Self::arbitrary(&mut unstructured).unwrap_or_default()
8250    }
8251}
8252impl Default for PARAM_EXT_ACK_DATA {
8253    fn default() -> Self {
8254        Self::DEFAULT.clone()
8255    }
8256}
8257impl MessageData for PARAM_EXT_ACK_DATA {
8258    type Message = MavMessage;
8259    const ID: u32 = 324u32;
8260    const NAME: &'static str = "PARAM_EXT_ACK";
8261    const EXTRA_CRC: u8 = 132u8;
8262    const ENCODED_LEN: usize = 146usize;
8263    fn deser(
8264        _version: MavlinkVersion,
8265        __input: &[u8],
8266    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8267        let avail_len = __input.len();
8268        let mut payload_buf = [0; Self::ENCODED_LEN];
8269        let mut buf = if avail_len < Self::ENCODED_LEN {
8270            payload_buf[0..avail_len].copy_from_slice(__input);
8271            Bytes::new(&payload_buf)
8272        } else {
8273            Bytes::new(__input)
8274        };
8275        let mut __struct = Self::default();
8276        for v in &mut __struct.param_id {
8277            let val = buf.get_u8();
8278            *v = val;
8279        }
8280        for v in &mut __struct.param_value {
8281            let val = buf.get_u8();
8282            *v = val;
8283        }
8284        let tmp = buf.get_u8();
8285        __struct.param_type =
8286            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8287                enum_type: "MavParamExtType",
8288                value: tmp as u32,
8289            })?;
8290        let tmp = buf.get_u8();
8291        __struct.param_result =
8292            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8293                enum_type: "ParamAck",
8294                value: tmp as u32,
8295            })?;
8296        Ok(__struct)
8297    }
8298    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8299        let mut __tmp = BytesMut::new(bytes);
8300        #[allow(clippy::absurd_extreme_comparisons)]
8301        #[allow(unused_comparisons)]
8302        if __tmp.remaining() < Self::ENCODED_LEN {
8303            panic!(
8304                "buffer is too small (need {} bytes, but got {})",
8305                Self::ENCODED_LEN,
8306                __tmp.remaining(),
8307            )
8308        }
8309        for val in &self.param_id {
8310            __tmp.put_u8(*val);
8311        }
8312        for val in &self.param_value {
8313            __tmp.put_u8(*val);
8314        }
8315        __tmp.put_u8(self.param_type as u8);
8316        __tmp.put_u8(self.param_result as u8);
8317        if matches!(version, MavlinkVersion::V2) {
8318            let len = __tmp.len();
8319            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8320        } else {
8321            __tmp.len()
8322        }
8323    }
8324}
8325#[doc = "id: 330"]
8326#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
8327#[derive(Debug, Clone, PartialEq)]
8328#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8329#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8330pub struct OBSTACLE_DISTANCE_DATA {
8331    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
8332    pub time_usec: u64,
8333    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
8334    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8335    pub distances: [u16; 72],
8336    #[doc = "Minimum distance the sensor can measure."]
8337    pub min_distance: u16,
8338    #[doc = "Maximum distance the sensor can measure."]
8339    pub max_distance: u16,
8340    #[doc = "Class id of the distance sensor type."]
8341    pub sensor_type: MavDistanceSensor,
8342    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
8343    pub increment: u8,
8344    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
8345    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8346    pub increment_f: f32,
8347    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
8348    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8349    pub angle_offset: f32,
8350    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
8351    #[cfg_attr(feature = "serde", serde(default))]
8352    pub frame: MavFrame,
8353}
8354impl OBSTACLE_DISTANCE_DATA {
8355    pub const ENCODED_LEN: usize = 167usize;
8356    pub const DEFAULT: Self = Self {
8357        time_usec: 0_u64,
8358        distances: [0_u16; 72usize],
8359        min_distance: 0_u16,
8360        max_distance: 0_u16,
8361        sensor_type: MavDistanceSensor::DEFAULT,
8362        increment: 0_u8,
8363        increment_f: 0.0_f32,
8364        angle_offset: 0.0_f32,
8365        frame: MavFrame::DEFAULT,
8366    };
8367    #[cfg(feature = "arbitrary")]
8368    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8369        use arbitrary::{Arbitrary, Unstructured};
8370        let mut buf = [0u8; 1024];
8371        rng.fill_bytes(&mut buf);
8372        let mut unstructured = Unstructured::new(&buf);
8373        Self::arbitrary(&mut unstructured).unwrap_or_default()
8374    }
8375}
8376impl Default for OBSTACLE_DISTANCE_DATA {
8377    fn default() -> Self {
8378        Self::DEFAULT.clone()
8379    }
8380}
8381impl MessageData for OBSTACLE_DISTANCE_DATA {
8382    type Message = MavMessage;
8383    const ID: u32 = 330u32;
8384    const NAME: &'static str = "OBSTACLE_DISTANCE";
8385    const EXTRA_CRC: u8 = 23u8;
8386    const ENCODED_LEN: usize = 167usize;
8387    fn deser(
8388        _version: MavlinkVersion,
8389        __input: &[u8],
8390    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8391        let avail_len = __input.len();
8392        let mut payload_buf = [0; Self::ENCODED_LEN];
8393        let mut buf = if avail_len < Self::ENCODED_LEN {
8394            payload_buf[0..avail_len].copy_from_slice(__input);
8395            Bytes::new(&payload_buf)
8396        } else {
8397            Bytes::new(__input)
8398        };
8399        let mut __struct = Self::default();
8400        __struct.time_usec = buf.get_u64_le();
8401        for v in &mut __struct.distances {
8402            let val = buf.get_u16_le();
8403            *v = val;
8404        }
8405        __struct.min_distance = buf.get_u16_le();
8406        __struct.max_distance = buf.get_u16_le();
8407        let tmp = buf.get_u8();
8408        __struct.sensor_type =
8409            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8410                enum_type: "MavDistanceSensor",
8411                value: tmp as u32,
8412            })?;
8413        __struct.increment = buf.get_u8();
8414        __struct.increment_f = buf.get_f32_le();
8415        __struct.angle_offset = buf.get_f32_le();
8416        let tmp = buf.get_u8();
8417        __struct.frame =
8418            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8419                enum_type: "MavFrame",
8420                value: tmp as u32,
8421            })?;
8422        Ok(__struct)
8423    }
8424    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8425        let mut __tmp = BytesMut::new(bytes);
8426        #[allow(clippy::absurd_extreme_comparisons)]
8427        #[allow(unused_comparisons)]
8428        if __tmp.remaining() < Self::ENCODED_LEN {
8429            panic!(
8430                "buffer is too small (need {} bytes, but got {})",
8431                Self::ENCODED_LEN,
8432                __tmp.remaining(),
8433            )
8434        }
8435        __tmp.put_u64_le(self.time_usec);
8436        for val in &self.distances {
8437            __tmp.put_u16_le(*val);
8438        }
8439        __tmp.put_u16_le(self.min_distance);
8440        __tmp.put_u16_le(self.max_distance);
8441        __tmp.put_u8(self.sensor_type as u8);
8442        __tmp.put_u8(self.increment);
8443        __tmp.put_f32_le(self.increment_f);
8444        __tmp.put_f32_le(self.angle_offset);
8445        __tmp.put_u8(self.frame as u8);
8446        if matches!(version, MavlinkVersion::V2) {
8447            let len = __tmp.len();
8448            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8449        } else {
8450            __tmp.len()
8451        }
8452    }
8453}
8454#[doc = "id: 339"]
8455#[doc = "RPM sensor data message."]
8456#[derive(Debug, Clone, PartialEq)]
8457#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8458#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8459pub struct RAW_RPM_DATA {
8460    #[doc = "Indicated rate"]
8461    pub frequency: f32,
8462    #[doc = "Index of this RPM sensor (0-indexed)"]
8463    pub index: u8,
8464}
8465impl RAW_RPM_DATA {
8466    pub const ENCODED_LEN: usize = 5usize;
8467    pub const DEFAULT: Self = Self {
8468        frequency: 0.0_f32,
8469        index: 0_u8,
8470    };
8471    #[cfg(feature = "arbitrary")]
8472    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8473        use arbitrary::{Arbitrary, Unstructured};
8474        let mut buf = [0u8; 1024];
8475        rng.fill_bytes(&mut buf);
8476        let mut unstructured = Unstructured::new(&buf);
8477        Self::arbitrary(&mut unstructured).unwrap_or_default()
8478    }
8479}
8480impl Default for RAW_RPM_DATA {
8481    fn default() -> Self {
8482        Self::DEFAULT.clone()
8483    }
8484}
8485impl MessageData for RAW_RPM_DATA {
8486    type Message = MavMessage;
8487    const ID: u32 = 339u32;
8488    const NAME: &'static str = "RAW_RPM";
8489    const EXTRA_CRC: u8 = 199u8;
8490    const ENCODED_LEN: usize = 5usize;
8491    fn deser(
8492        _version: MavlinkVersion,
8493        __input: &[u8],
8494    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8495        let avail_len = __input.len();
8496        let mut payload_buf = [0; Self::ENCODED_LEN];
8497        let mut buf = if avail_len < Self::ENCODED_LEN {
8498            payload_buf[0..avail_len].copy_from_slice(__input);
8499            Bytes::new(&payload_buf)
8500        } else {
8501            Bytes::new(__input)
8502        };
8503        let mut __struct = Self::default();
8504        __struct.frequency = buf.get_f32_le();
8505        __struct.index = buf.get_u8();
8506        Ok(__struct)
8507    }
8508    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8509        let mut __tmp = BytesMut::new(bytes);
8510        #[allow(clippy::absurd_extreme_comparisons)]
8511        #[allow(unused_comparisons)]
8512        if __tmp.remaining() < Self::ENCODED_LEN {
8513            panic!(
8514                "buffer is too small (need {} bytes, but got {})",
8515                Self::ENCODED_LEN,
8516                __tmp.remaining(),
8517            )
8518        }
8519        __tmp.put_f32_le(self.frequency);
8520        __tmp.put_u8(self.index);
8521        if matches!(version, MavlinkVersion::V2) {
8522            let len = __tmp.len();
8523            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8524        } else {
8525            __tmp.len()
8526        }
8527    }
8528}
8529#[doc = "id: 113"]
8530#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
8531#[derive(Debug, Clone, PartialEq)]
8532#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8533#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8534pub struct HIL_GPS_DATA {
8535    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
8536    pub time_usec: u64,
8537    #[doc = "Latitude (WGS84)"]
8538    pub lat: i32,
8539    #[doc = "Longitude (WGS84)"]
8540    pub lon: i32,
8541    #[doc = "Altitude (MSL). Positive for up."]
8542    pub alt: i32,
8543    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
8544    pub eph: u16,
8545    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
8546    pub epv: u16,
8547    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
8548    pub vel: u16,
8549    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
8550    pub vn: i16,
8551    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
8552    pub ve: i16,
8553    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
8554    pub vd: i16,
8555    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
8556    pub cog: u16,
8557    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
8558    pub fix_type: u8,
8559    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
8560    pub satellites_visible: u8,
8561    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
8562    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8563    pub id: u8,
8564    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
8565    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8566    pub yaw: u16,
8567}
8568impl HIL_GPS_DATA {
8569    pub const ENCODED_LEN: usize = 39usize;
8570    pub const DEFAULT: Self = Self {
8571        time_usec: 0_u64,
8572        lat: 0_i32,
8573        lon: 0_i32,
8574        alt: 0_i32,
8575        eph: 0_u16,
8576        epv: 0_u16,
8577        vel: 0_u16,
8578        vn: 0_i16,
8579        ve: 0_i16,
8580        vd: 0_i16,
8581        cog: 0_u16,
8582        fix_type: 0_u8,
8583        satellites_visible: 0_u8,
8584        id: 0_u8,
8585        yaw: 0_u16,
8586    };
8587    #[cfg(feature = "arbitrary")]
8588    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8589        use arbitrary::{Arbitrary, Unstructured};
8590        let mut buf = [0u8; 1024];
8591        rng.fill_bytes(&mut buf);
8592        let mut unstructured = Unstructured::new(&buf);
8593        Self::arbitrary(&mut unstructured).unwrap_or_default()
8594    }
8595}
8596impl Default for HIL_GPS_DATA {
8597    fn default() -> Self {
8598        Self::DEFAULT.clone()
8599    }
8600}
8601impl MessageData for HIL_GPS_DATA {
8602    type Message = MavMessage;
8603    const ID: u32 = 113u32;
8604    const NAME: &'static str = "HIL_GPS";
8605    const EXTRA_CRC: u8 = 124u8;
8606    const ENCODED_LEN: usize = 39usize;
8607    fn deser(
8608        _version: MavlinkVersion,
8609        __input: &[u8],
8610    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8611        let avail_len = __input.len();
8612        let mut payload_buf = [0; Self::ENCODED_LEN];
8613        let mut buf = if avail_len < Self::ENCODED_LEN {
8614            payload_buf[0..avail_len].copy_from_slice(__input);
8615            Bytes::new(&payload_buf)
8616        } else {
8617            Bytes::new(__input)
8618        };
8619        let mut __struct = Self::default();
8620        __struct.time_usec = buf.get_u64_le();
8621        __struct.lat = buf.get_i32_le();
8622        __struct.lon = buf.get_i32_le();
8623        __struct.alt = buf.get_i32_le();
8624        __struct.eph = buf.get_u16_le();
8625        __struct.epv = buf.get_u16_le();
8626        __struct.vel = buf.get_u16_le();
8627        __struct.vn = buf.get_i16_le();
8628        __struct.ve = buf.get_i16_le();
8629        __struct.vd = buf.get_i16_le();
8630        __struct.cog = buf.get_u16_le();
8631        __struct.fix_type = buf.get_u8();
8632        __struct.satellites_visible = buf.get_u8();
8633        __struct.id = buf.get_u8();
8634        __struct.yaw = buf.get_u16_le();
8635        Ok(__struct)
8636    }
8637    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8638        let mut __tmp = BytesMut::new(bytes);
8639        #[allow(clippy::absurd_extreme_comparisons)]
8640        #[allow(unused_comparisons)]
8641        if __tmp.remaining() < Self::ENCODED_LEN {
8642            panic!(
8643                "buffer is too small (need {} bytes, but got {})",
8644                Self::ENCODED_LEN,
8645                __tmp.remaining(),
8646            )
8647        }
8648        __tmp.put_u64_le(self.time_usec);
8649        __tmp.put_i32_le(self.lat);
8650        __tmp.put_i32_le(self.lon);
8651        __tmp.put_i32_le(self.alt);
8652        __tmp.put_u16_le(self.eph);
8653        __tmp.put_u16_le(self.epv);
8654        __tmp.put_u16_le(self.vel);
8655        __tmp.put_i16_le(self.vn);
8656        __tmp.put_i16_le(self.ve);
8657        __tmp.put_i16_le(self.vd);
8658        __tmp.put_u16_le(self.cog);
8659        __tmp.put_u8(self.fix_type);
8660        __tmp.put_u8(self.satellites_visible);
8661        __tmp.put_u8(self.id);
8662        __tmp.put_u16_le(self.yaw);
8663        if matches!(version, MavlinkVersion::V2) {
8664            let len = __tmp.len();
8665            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8666        } else {
8667            __tmp.len()
8668        }
8669    }
8670}
8671#[doc = "id: 125"]
8672#[doc = "Power supply status."]
8673#[derive(Debug, Clone, PartialEq)]
8674#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8675#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8676pub struct POWER_STATUS_DATA {
8677    #[doc = "5V rail voltage."]
8678    pub Vcc: u16,
8679    #[doc = "Servo rail voltage."]
8680    pub Vservo: u16,
8681    #[doc = "Bitmap of power supply status flags."]
8682    pub flags: MavPowerStatus,
8683}
8684impl POWER_STATUS_DATA {
8685    pub const ENCODED_LEN: usize = 6usize;
8686    pub const DEFAULT: Self = Self {
8687        Vcc: 0_u16,
8688        Vservo: 0_u16,
8689        flags: MavPowerStatus::DEFAULT,
8690    };
8691    #[cfg(feature = "arbitrary")]
8692    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8693        use arbitrary::{Arbitrary, Unstructured};
8694        let mut buf = [0u8; 1024];
8695        rng.fill_bytes(&mut buf);
8696        let mut unstructured = Unstructured::new(&buf);
8697        Self::arbitrary(&mut unstructured).unwrap_or_default()
8698    }
8699}
8700impl Default for POWER_STATUS_DATA {
8701    fn default() -> Self {
8702        Self::DEFAULT.clone()
8703    }
8704}
8705impl MessageData for POWER_STATUS_DATA {
8706    type Message = MavMessage;
8707    const ID: u32 = 125u32;
8708    const NAME: &'static str = "POWER_STATUS";
8709    const EXTRA_CRC: u8 = 203u8;
8710    const ENCODED_LEN: usize = 6usize;
8711    fn deser(
8712        _version: MavlinkVersion,
8713        __input: &[u8],
8714    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8715        let avail_len = __input.len();
8716        let mut payload_buf = [0; Self::ENCODED_LEN];
8717        let mut buf = if avail_len < Self::ENCODED_LEN {
8718            payload_buf[0..avail_len].copy_from_slice(__input);
8719            Bytes::new(&payload_buf)
8720        } else {
8721            Bytes::new(__input)
8722        };
8723        let mut __struct = Self::default();
8724        __struct.Vcc = buf.get_u16_le();
8725        __struct.Vservo = buf.get_u16_le();
8726        let tmp = buf.get_u16_le();
8727        __struct.flags = MavPowerStatus::from_bits(tmp & MavPowerStatus::all().bits()).ok_or(
8728            ::mavlink_core::error::ParserError::InvalidFlag {
8729                flag_type: "MavPowerStatus",
8730                value: tmp as u32,
8731            },
8732        )?;
8733        Ok(__struct)
8734    }
8735    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8736        let mut __tmp = BytesMut::new(bytes);
8737        #[allow(clippy::absurd_extreme_comparisons)]
8738        #[allow(unused_comparisons)]
8739        if __tmp.remaining() < Self::ENCODED_LEN {
8740            panic!(
8741                "buffer is too small (need {} bytes, but got {})",
8742                Self::ENCODED_LEN,
8743                __tmp.remaining(),
8744            )
8745        }
8746        __tmp.put_u16_le(self.Vcc);
8747        __tmp.put_u16_le(self.Vservo);
8748        __tmp.put_u16_le(self.flags.bits());
8749        if matches!(version, MavlinkVersion::V2) {
8750            let len = __tmp.len();
8751            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8752        } else {
8753            __tmp.len()
8754        }
8755    }
8756}
8757#[doc = "id: 225"]
8758#[doc = "EFI status output."]
8759#[derive(Debug, Clone, PartialEq)]
8760#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8761#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8762pub struct EFI_STATUS_DATA {
8763    #[doc = "ECU index"]
8764    pub ecu_index: f32,
8765    #[doc = "RPM"]
8766    pub rpm: f32,
8767    #[doc = "Fuel consumed"]
8768    pub fuel_consumed: f32,
8769    #[doc = "Fuel flow rate"]
8770    pub fuel_flow: f32,
8771    #[doc = "Engine load"]
8772    pub engine_load: f32,
8773    #[doc = "Throttle position"]
8774    pub throttle_position: f32,
8775    #[doc = "Spark dwell time"]
8776    pub spark_dwell_time: f32,
8777    #[doc = "Barometric pressure"]
8778    pub barometric_pressure: f32,
8779    #[doc = "Intake manifold pressure("]
8780    pub intake_manifold_pressure: f32,
8781    #[doc = "Intake manifold temperature"]
8782    pub intake_manifold_temperature: f32,
8783    #[doc = "Cylinder head temperature"]
8784    pub cylinder_head_temperature: f32,
8785    #[doc = "Ignition timing (Crank angle degrees)"]
8786    pub ignition_timing: f32,
8787    #[doc = "Injection time"]
8788    pub injection_time: f32,
8789    #[doc = "Exhaust gas temperature"]
8790    pub exhaust_gas_temperature: f32,
8791    #[doc = "Output throttle"]
8792    pub throttle_out: f32,
8793    #[doc = "Pressure/temperature compensation"]
8794    pub pt_compensation: f32,
8795    #[doc = "EFI health status"]
8796    pub health: u8,
8797    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
8798    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8799    pub ignition_voltage: f32,
8800    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
8801    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8802    pub fuel_pressure: f32,
8803}
8804impl EFI_STATUS_DATA {
8805    pub const ENCODED_LEN: usize = 73usize;
8806    pub const DEFAULT: Self = Self {
8807        ecu_index: 0.0_f32,
8808        rpm: 0.0_f32,
8809        fuel_consumed: 0.0_f32,
8810        fuel_flow: 0.0_f32,
8811        engine_load: 0.0_f32,
8812        throttle_position: 0.0_f32,
8813        spark_dwell_time: 0.0_f32,
8814        barometric_pressure: 0.0_f32,
8815        intake_manifold_pressure: 0.0_f32,
8816        intake_manifold_temperature: 0.0_f32,
8817        cylinder_head_temperature: 0.0_f32,
8818        ignition_timing: 0.0_f32,
8819        injection_time: 0.0_f32,
8820        exhaust_gas_temperature: 0.0_f32,
8821        throttle_out: 0.0_f32,
8822        pt_compensation: 0.0_f32,
8823        health: 0_u8,
8824        ignition_voltage: 0.0_f32,
8825        fuel_pressure: 0.0_f32,
8826    };
8827    #[cfg(feature = "arbitrary")]
8828    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8829        use arbitrary::{Arbitrary, Unstructured};
8830        let mut buf = [0u8; 1024];
8831        rng.fill_bytes(&mut buf);
8832        let mut unstructured = Unstructured::new(&buf);
8833        Self::arbitrary(&mut unstructured).unwrap_or_default()
8834    }
8835}
8836impl Default for EFI_STATUS_DATA {
8837    fn default() -> Self {
8838        Self::DEFAULT.clone()
8839    }
8840}
8841impl MessageData for EFI_STATUS_DATA {
8842    type Message = MavMessage;
8843    const ID: u32 = 225u32;
8844    const NAME: &'static str = "EFI_STATUS";
8845    const EXTRA_CRC: u8 = 208u8;
8846    const ENCODED_LEN: usize = 73usize;
8847    fn deser(
8848        _version: MavlinkVersion,
8849        __input: &[u8],
8850    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8851        let avail_len = __input.len();
8852        let mut payload_buf = [0; Self::ENCODED_LEN];
8853        let mut buf = if avail_len < Self::ENCODED_LEN {
8854            payload_buf[0..avail_len].copy_from_slice(__input);
8855            Bytes::new(&payload_buf)
8856        } else {
8857            Bytes::new(__input)
8858        };
8859        let mut __struct = Self::default();
8860        __struct.ecu_index = buf.get_f32_le();
8861        __struct.rpm = buf.get_f32_le();
8862        __struct.fuel_consumed = buf.get_f32_le();
8863        __struct.fuel_flow = buf.get_f32_le();
8864        __struct.engine_load = buf.get_f32_le();
8865        __struct.throttle_position = buf.get_f32_le();
8866        __struct.spark_dwell_time = buf.get_f32_le();
8867        __struct.barometric_pressure = buf.get_f32_le();
8868        __struct.intake_manifold_pressure = buf.get_f32_le();
8869        __struct.intake_manifold_temperature = buf.get_f32_le();
8870        __struct.cylinder_head_temperature = buf.get_f32_le();
8871        __struct.ignition_timing = buf.get_f32_le();
8872        __struct.injection_time = buf.get_f32_le();
8873        __struct.exhaust_gas_temperature = buf.get_f32_le();
8874        __struct.throttle_out = buf.get_f32_le();
8875        __struct.pt_compensation = buf.get_f32_le();
8876        __struct.health = buf.get_u8();
8877        __struct.ignition_voltage = buf.get_f32_le();
8878        __struct.fuel_pressure = buf.get_f32_le();
8879        Ok(__struct)
8880    }
8881    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8882        let mut __tmp = BytesMut::new(bytes);
8883        #[allow(clippy::absurd_extreme_comparisons)]
8884        #[allow(unused_comparisons)]
8885        if __tmp.remaining() < Self::ENCODED_LEN {
8886            panic!(
8887                "buffer is too small (need {} bytes, but got {})",
8888                Self::ENCODED_LEN,
8889                __tmp.remaining(),
8890            )
8891        }
8892        __tmp.put_f32_le(self.ecu_index);
8893        __tmp.put_f32_le(self.rpm);
8894        __tmp.put_f32_le(self.fuel_consumed);
8895        __tmp.put_f32_le(self.fuel_flow);
8896        __tmp.put_f32_le(self.engine_load);
8897        __tmp.put_f32_le(self.throttle_position);
8898        __tmp.put_f32_le(self.spark_dwell_time);
8899        __tmp.put_f32_le(self.barometric_pressure);
8900        __tmp.put_f32_le(self.intake_manifold_pressure);
8901        __tmp.put_f32_le(self.intake_manifold_temperature);
8902        __tmp.put_f32_le(self.cylinder_head_temperature);
8903        __tmp.put_f32_le(self.ignition_timing);
8904        __tmp.put_f32_le(self.injection_time);
8905        __tmp.put_f32_le(self.exhaust_gas_temperature);
8906        __tmp.put_f32_le(self.throttle_out);
8907        __tmp.put_f32_le(self.pt_compensation);
8908        __tmp.put_u8(self.health);
8909        __tmp.put_f32_le(self.ignition_voltage);
8910        __tmp.put_f32_le(self.fuel_pressure);
8911        if matches!(version, MavlinkVersion::V2) {
8912            let len = __tmp.len();
8913            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8914        } else {
8915            __tmp.len()
8916        }
8917    }
8918}
8919#[doc = "id: 249"]
8920#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
8921#[derive(Debug, Clone, PartialEq)]
8922#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8923#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8924pub struct MEMORY_VECT_DATA {
8925    #[doc = "Starting address of the debug variables"]
8926    pub address: u16,
8927    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
8928    pub ver: u8,
8929    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
8930    pub mavtype: u8,
8931    #[doc = "Memory contents at specified address"]
8932    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8933    pub value: [i8; 32],
8934}
8935impl MEMORY_VECT_DATA {
8936    pub const ENCODED_LEN: usize = 36usize;
8937    pub const DEFAULT: Self = Self {
8938        address: 0_u16,
8939        ver: 0_u8,
8940        mavtype: 0_u8,
8941        value: [0_i8; 32usize],
8942    };
8943    #[cfg(feature = "arbitrary")]
8944    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8945        use arbitrary::{Arbitrary, Unstructured};
8946        let mut buf = [0u8; 1024];
8947        rng.fill_bytes(&mut buf);
8948        let mut unstructured = Unstructured::new(&buf);
8949        Self::arbitrary(&mut unstructured).unwrap_or_default()
8950    }
8951}
8952impl Default for MEMORY_VECT_DATA {
8953    fn default() -> Self {
8954        Self::DEFAULT.clone()
8955    }
8956}
8957impl MessageData for MEMORY_VECT_DATA {
8958    type Message = MavMessage;
8959    const ID: u32 = 249u32;
8960    const NAME: &'static str = "MEMORY_VECT";
8961    const EXTRA_CRC: u8 = 204u8;
8962    const ENCODED_LEN: usize = 36usize;
8963    fn deser(
8964        _version: MavlinkVersion,
8965        __input: &[u8],
8966    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8967        let avail_len = __input.len();
8968        let mut payload_buf = [0; Self::ENCODED_LEN];
8969        let mut buf = if avail_len < Self::ENCODED_LEN {
8970            payload_buf[0..avail_len].copy_from_slice(__input);
8971            Bytes::new(&payload_buf)
8972        } else {
8973            Bytes::new(__input)
8974        };
8975        let mut __struct = Self::default();
8976        __struct.address = buf.get_u16_le();
8977        __struct.ver = buf.get_u8();
8978        __struct.mavtype = buf.get_u8();
8979        for v in &mut __struct.value {
8980            let val = buf.get_i8();
8981            *v = val;
8982        }
8983        Ok(__struct)
8984    }
8985    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8986        let mut __tmp = BytesMut::new(bytes);
8987        #[allow(clippy::absurd_extreme_comparisons)]
8988        #[allow(unused_comparisons)]
8989        if __tmp.remaining() < Self::ENCODED_LEN {
8990            panic!(
8991                "buffer is too small (need {} bytes, but got {})",
8992                Self::ENCODED_LEN,
8993                __tmp.remaining(),
8994            )
8995        }
8996        __tmp.put_u16_le(self.address);
8997        __tmp.put_u8(self.ver);
8998        __tmp.put_u8(self.mavtype);
8999        for val in &self.value {
9000            __tmp.put_i8(*val);
9001        }
9002        if matches!(version, MavlinkVersion::V2) {
9003            let len = __tmp.len();
9004            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9005        } else {
9006            __tmp.len()
9007        }
9008    }
9009}
9010#[doc = "id: 118"]
9011#[doc = "Reply to LOG_REQUEST_LIST."]
9012#[derive(Debug, Clone, PartialEq)]
9013#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9014#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9015pub struct LOG_ENTRY_DATA {
9016    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
9017    pub time_utc: u32,
9018    #[doc = "Size of the log (may be approximate)"]
9019    pub size: u32,
9020    #[doc = "Log id"]
9021    pub id: u16,
9022    #[doc = "Total number of logs"]
9023    pub num_logs: u16,
9024    #[doc = "High log number"]
9025    pub last_log_num: u16,
9026}
9027impl LOG_ENTRY_DATA {
9028    pub const ENCODED_LEN: usize = 14usize;
9029    pub const DEFAULT: Self = Self {
9030        time_utc: 0_u32,
9031        size: 0_u32,
9032        id: 0_u16,
9033        num_logs: 0_u16,
9034        last_log_num: 0_u16,
9035    };
9036    #[cfg(feature = "arbitrary")]
9037    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9038        use arbitrary::{Arbitrary, Unstructured};
9039        let mut buf = [0u8; 1024];
9040        rng.fill_bytes(&mut buf);
9041        let mut unstructured = Unstructured::new(&buf);
9042        Self::arbitrary(&mut unstructured).unwrap_or_default()
9043    }
9044}
9045impl Default for LOG_ENTRY_DATA {
9046    fn default() -> Self {
9047        Self::DEFAULT.clone()
9048    }
9049}
9050impl MessageData for LOG_ENTRY_DATA {
9051    type Message = MavMessage;
9052    const ID: u32 = 118u32;
9053    const NAME: &'static str = "LOG_ENTRY";
9054    const EXTRA_CRC: u8 = 56u8;
9055    const ENCODED_LEN: usize = 14usize;
9056    fn deser(
9057        _version: MavlinkVersion,
9058        __input: &[u8],
9059    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9060        let avail_len = __input.len();
9061        let mut payload_buf = [0; Self::ENCODED_LEN];
9062        let mut buf = if avail_len < Self::ENCODED_LEN {
9063            payload_buf[0..avail_len].copy_from_slice(__input);
9064            Bytes::new(&payload_buf)
9065        } else {
9066            Bytes::new(__input)
9067        };
9068        let mut __struct = Self::default();
9069        __struct.time_utc = buf.get_u32_le();
9070        __struct.size = buf.get_u32_le();
9071        __struct.id = buf.get_u16_le();
9072        __struct.num_logs = buf.get_u16_le();
9073        __struct.last_log_num = buf.get_u16_le();
9074        Ok(__struct)
9075    }
9076    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9077        let mut __tmp = BytesMut::new(bytes);
9078        #[allow(clippy::absurd_extreme_comparisons)]
9079        #[allow(unused_comparisons)]
9080        if __tmp.remaining() < Self::ENCODED_LEN {
9081            panic!(
9082                "buffer is too small (need {} bytes, but got {})",
9083                Self::ENCODED_LEN,
9084                __tmp.remaining(),
9085            )
9086        }
9087        __tmp.put_u32_le(self.time_utc);
9088        __tmp.put_u32_le(self.size);
9089        __tmp.put_u16_le(self.id);
9090        __tmp.put_u16_le(self.num_logs);
9091        __tmp.put_u16_le(self.last_log_num);
9092        if matches!(version, MavlinkVersion::V2) {
9093            let len = __tmp.len();
9094            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9095        } else {
9096            __tmp.len()
9097        }
9098    }
9099}
9100#[doc = "id: 412"]
9101#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
9102#[derive(Debug, Clone, PartialEq)]
9103#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9104#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9105pub struct REQUEST_EVENT_DATA {
9106    #[doc = "First sequence number of the requested event."]
9107    pub first_sequence: u16,
9108    #[doc = "Last sequence number of the requested event."]
9109    pub last_sequence: u16,
9110    #[doc = "System ID"]
9111    pub target_system: u8,
9112    #[doc = "Component ID"]
9113    pub target_component: u8,
9114}
9115impl REQUEST_EVENT_DATA {
9116    pub const ENCODED_LEN: usize = 6usize;
9117    pub const DEFAULT: Self = Self {
9118        first_sequence: 0_u16,
9119        last_sequence: 0_u16,
9120        target_system: 0_u8,
9121        target_component: 0_u8,
9122    };
9123    #[cfg(feature = "arbitrary")]
9124    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9125        use arbitrary::{Arbitrary, Unstructured};
9126        let mut buf = [0u8; 1024];
9127        rng.fill_bytes(&mut buf);
9128        let mut unstructured = Unstructured::new(&buf);
9129        Self::arbitrary(&mut unstructured).unwrap_or_default()
9130    }
9131}
9132impl Default for REQUEST_EVENT_DATA {
9133    fn default() -> Self {
9134        Self::DEFAULT.clone()
9135    }
9136}
9137impl MessageData for REQUEST_EVENT_DATA {
9138    type Message = MavMessage;
9139    const ID: u32 = 412u32;
9140    const NAME: &'static str = "REQUEST_EVENT";
9141    const EXTRA_CRC: u8 = 33u8;
9142    const ENCODED_LEN: usize = 6usize;
9143    fn deser(
9144        _version: MavlinkVersion,
9145        __input: &[u8],
9146    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9147        let avail_len = __input.len();
9148        let mut payload_buf = [0; Self::ENCODED_LEN];
9149        let mut buf = if avail_len < Self::ENCODED_LEN {
9150            payload_buf[0..avail_len].copy_from_slice(__input);
9151            Bytes::new(&payload_buf)
9152        } else {
9153            Bytes::new(__input)
9154        };
9155        let mut __struct = Self::default();
9156        __struct.first_sequence = buf.get_u16_le();
9157        __struct.last_sequence = buf.get_u16_le();
9158        __struct.target_system = buf.get_u8();
9159        __struct.target_component = buf.get_u8();
9160        Ok(__struct)
9161    }
9162    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9163        let mut __tmp = BytesMut::new(bytes);
9164        #[allow(clippy::absurd_extreme_comparisons)]
9165        #[allow(unused_comparisons)]
9166        if __tmp.remaining() < Self::ENCODED_LEN {
9167            panic!(
9168                "buffer is too small (need {} bytes, but got {})",
9169                Self::ENCODED_LEN,
9170                __tmp.remaining(),
9171            )
9172        }
9173        __tmp.put_u16_le(self.first_sequence);
9174        __tmp.put_u16_le(self.last_sequence);
9175        __tmp.put_u8(self.target_system);
9176        __tmp.put_u8(self.target_component);
9177        if matches!(version, MavlinkVersion::V2) {
9178            let len = __tmp.len();
9179            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9180        } else {
9181            __tmp.len()
9182        }
9183    }
9184}
9185#[doc = "id: 21"]
9186#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
9187#[derive(Debug, Clone, PartialEq)]
9188#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9189#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9190pub struct PARAM_REQUEST_LIST_DATA {
9191    #[doc = "System ID"]
9192    pub target_system: u8,
9193    #[doc = "Component ID"]
9194    pub target_component: u8,
9195}
9196impl PARAM_REQUEST_LIST_DATA {
9197    pub const ENCODED_LEN: usize = 2usize;
9198    pub const DEFAULT: Self = Self {
9199        target_system: 0_u8,
9200        target_component: 0_u8,
9201    };
9202    #[cfg(feature = "arbitrary")]
9203    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9204        use arbitrary::{Arbitrary, Unstructured};
9205        let mut buf = [0u8; 1024];
9206        rng.fill_bytes(&mut buf);
9207        let mut unstructured = Unstructured::new(&buf);
9208        Self::arbitrary(&mut unstructured).unwrap_or_default()
9209    }
9210}
9211impl Default for PARAM_REQUEST_LIST_DATA {
9212    fn default() -> Self {
9213        Self::DEFAULT.clone()
9214    }
9215}
9216impl MessageData for PARAM_REQUEST_LIST_DATA {
9217    type Message = MavMessage;
9218    const ID: u32 = 21u32;
9219    const NAME: &'static str = "PARAM_REQUEST_LIST";
9220    const EXTRA_CRC: u8 = 159u8;
9221    const ENCODED_LEN: usize = 2usize;
9222    fn deser(
9223        _version: MavlinkVersion,
9224        __input: &[u8],
9225    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9226        let avail_len = __input.len();
9227        let mut payload_buf = [0; Self::ENCODED_LEN];
9228        let mut buf = if avail_len < Self::ENCODED_LEN {
9229            payload_buf[0..avail_len].copy_from_slice(__input);
9230            Bytes::new(&payload_buf)
9231        } else {
9232            Bytes::new(__input)
9233        };
9234        let mut __struct = Self::default();
9235        __struct.target_system = buf.get_u8();
9236        __struct.target_component = buf.get_u8();
9237        Ok(__struct)
9238    }
9239    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9240        let mut __tmp = BytesMut::new(bytes);
9241        #[allow(clippy::absurd_extreme_comparisons)]
9242        #[allow(unused_comparisons)]
9243        if __tmp.remaining() < Self::ENCODED_LEN {
9244            panic!(
9245                "buffer is too small (need {} bytes, but got {})",
9246                Self::ENCODED_LEN,
9247                __tmp.remaining(),
9248            )
9249        }
9250        __tmp.put_u8(self.target_system);
9251        __tmp.put_u8(self.target_component);
9252        if matches!(version, MavlinkVersion::V2) {
9253            let len = __tmp.len();
9254            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9255        } else {
9256            __tmp.len()
9257        }
9258    }
9259}
9260#[doc = "id: 137"]
9261#[doc = "Barometer readings for 2nd barometer."]
9262#[derive(Debug, Clone, PartialEq)]
9263#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9264#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9265pub struct SCALED_PRESSURE2_DATA {
9266    #[doc = "Timestamp (time since system boot)."]
9267    pub time_boot_ms: u32,
9268    #[doc = "Absolute pressure"]
9269    pub press_abs: f32,
9270    #[doc = "Differential pressure"]
9271    pub press_diff: f32,
9272    #[doc = "Absolute pressure temperature"]
9273    pub temperature: i16,
9274    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
9275    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9276    pub temperature_press_diff: i16,
9277}
9278impl SCALED_PRESSURE2_DATA {
9279    pub const ENCODED_LEN: usize = 16usize;
9280    pub const DEFAULT: Self = Self {
9281        time_boot_ms: 0_u32,
9282        press_abs: 0.0_f32,
9283        press_diff: 0.0_f32,
9284        temperature: 0_i16,
9285        temperature_press_diff: 0_i16,
9286    };
9287    #[cfg(feature = "arbitrary")]
9288    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9289        use arbitrary::{Arbitrary, Unstructured};
9290        let mut buf = [0u8; 1024];
9291        rng.fill_bytes(&mut buf);
9292        let mut unstructured = Unstructured::new(&buf);
9293        Self::arbitrary(&mut unstructured).unwrap_or_default()
9294    }
9295}
9296impl Default for SCALED_PRESSURE2_DATA {
9297    fn default() -> Self {
9298        Self::DEFAULT.clone()
9299    }
9300}
9301impl MessageData for SCALED_PRESSURE2_DATA {
9302    type Message = MavMessage;
9303    const ID: u32 = 137u32;
9304    const NAME: &'static str = "SCALED_PRESSURE2";
9305    const EXTRA_CRC: u8 = 195u8;
9306    const ENCODED_LEN: usize = 16usize;
9307    fn deser(
9308        _version: MavlinkVersion,
9309        __input: &[u8],
9310    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9311        let avail_len = __input.len();
9312        let mut payload_buf = [0; Self::ENCODED_LEN];
9313        let mut buf = if avail_len < Self::ENCODED_LEN {
9314            payload_buf[0..avail_len].copy_from_slice(__input);
9315            Bytes::new(&payload_buf)
9316        } else {
9317            Bytes::new(__input)
9318        };
9319        let mut __struct = Self::default();
9320        __struct.time_boot_ms = buf.get_u32_le();
9321        __struct.press_abs = buf.get_f32_le();
9322        __struct.press_diff = buf.get_f32_le();
9323        __struct.temperature = buf.get_i16_le();
9324        __struct.temperature_press_diff = buf.get_i16_le();
9325        Ok(__struct)
9326    }
9327    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9328        let mut __tmp = BytesMut::new(bytes);
9329        #[allow(clippy::absurd_extreme_comparisons)]
9330        #[allow(unused_comparisons)]
9331        if __tmp.remaining() < Self::ENCODED_LEN {
9332            panic!(
9333                "buffer is too small (need {} bytes, but got {})",
9334                Self::ENCODED_LEN,
9335                __tmp.remaining(),
9336            )
9337        }
9338        __tmp.put_u32_le(self.time_boot_ms);
9339        __tmp.put_f32_le(self.press_abs);
9340        __tmp.put_f32_le(self.press_diff);
9341        __tmp.put_i16_le(self.temperature);
9342        __tmp.put_i16_le(self.temperature_press_diff);
9343        if matches!(version, MavlinkVersion::V2) {
9344            let len = __tmp.len();
9345            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9346        } else {
9347            __tmp.len()
9348        }
9349    }
9350}
9351#[doc = "id: 332"]
9352#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
9353#[derive(Debug, Clone, PartialEq)]
9354#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9355#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9356pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
9357    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
9358    pub time_usec: u64,
9359    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
9360    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9361    pub pos_x: [f32; 5],
9362    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
9363    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9364    pub pos_y: [f32; 5],
9365    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
9366    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9367    pub pos_z: [f32; 5],
9368    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
9369    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9370    pub vel_x: [f32; 5],
9371    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
9372    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9373    pub vel_y: [f32; 5],
9374    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
9375    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9376    pub vel_z: [f32; 5],
9377    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
9378    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9379    pub acc_x: [f32; 5],
9380    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
9381    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9382    pub acc_y: [f32; 5],
9383    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
9384    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9385    pub acc_z: [f32; 5],
9386    #[doc = "Yaw angle, set to NaN if not being used"]
9387    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9388    pub pos_yaw: [f32; 5],
9389    #[doc = "Yaw rate, set to NaN if not being used"]
9390    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9391    pub vel_yaw: [f32; 5],
9392    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
9393    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9394    pub command: [u16; 5],
9395    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
9396    pub valid_points: u8,
9397}
9398impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
9399    pub const ENCODED_LEN: usize = 239usize;
9400    pub const DEFAULT: Self = Self {
9401        time_usec: 0_u64,
9402        pos_x: [0.0_f32; 5usize],
9403        pos_y: [0.0_f32; 5usize],
9404        pos_z: [0.0_f32; 5usize],
9405        vel_x: [0.0_f32; 5usize],
9406        vel_y: [0.0_f32; 5usize],
9407        vel_z: [0.0_f32; 5usize],
9408        acc_x: [0.0_f32; 5usize],
9409        acc_y: [0.0_f32; 5usize],
9410        acc_z: [0.0_f32; 5usize],
9411        pos_yaw: [0.0_f32; 5usize],
9412        vel_yaw: [0.0_f32; 5usize],
9413        command: [0_u16; 5usize],
9414        valid_points: 0_u8,
9415    };
9416    #[cfg(feature = "arbitrary")]
9417    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9418        use arbitrary::{Arbitrary, Unstructured};
9419        let mut buf = [0u8; 1024];
9420        rng.fill_bytes(&mut buf);
9421        let mut unstructured = Unstructured::new(&buf);
9422        Self::arbitrary(&mut unstructured).unwrap_or_default()
9423    }
9424}
9425impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
9426    fn default() -> Self {
9427        Self::DEFAULT.clone()
9428    }
9429}
9430impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
9431    type Message = MavMessage;
9432    const ID: u32 = 332u32;
9433    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
9434    const EXTRA_CRC: u8 = 236u8;
9435    const ENCODED_LEN: usize = 239usize;
9436    fn deser(
9437        _version: MavlinkVersion,
9438        __input: &[u8],
9439    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9440        let avail_len = __input.len();
9441        let mut payload_buf = [0; Self::ENCODED_LEN];
9442        let mut buf = if avail_len < Self::ENCODED_LEN {
9443            payload_buf[0..avail_len].copy_from_slice(__input);
9444            Bytes::new(&payload_buf)
9445        } else {
9446            Bytes::new(__input)
9447        };
9448        let mut __struct = Self::default();
9449        __struct.time_usec = buf.get_u64_le();
9450        for v in &mut __struct.pos_x {
9451            let val = buf.get_f32_le();
9452            *v = val;
9453        }
9454        for v in &mut __struct.pos_y {
9455            let val = buf.get_f32_le();
9456            *v = val;
9457        }
9458        for v in &mut __struct.pos_z {
9459            let val = buf.get_f32_le();
9460            *v = val;
9461        }
9462        for v in &mut __struct.vel_x {
9463            let val = buf.get_f32_le();
9464            *v = val;
9465        }
9466        for v in &mut __struct.vel_y {
9467            let val = buf.get_f32_le();
9468            *v = val;
9469        }
9470        for v in &mut __struct.vel_z {
9471            let val = buf.get_f32_le();
9472            *v = val;
9473        }
9474        for v in &mut __struct.acc_x {
9475            let val = buf.get_f32_le();
9476            *v = val;
9477        }
9478        for v in &mut __struct.acc_y {
9479            let val = buf.get_f32_le();
9480            *v = val;
9481        }
9482        for v in &mut __struct.acc_z {
9483            let val = buf.get_f32_le();
9484            *v = val;
9485        }
9486        for v in &mut __struct.pos_yaw {
9487            let val = buf.get_f32_le();
9488            *v = val;
9489        }
9490        for v in &mut __struct.vel_yaw {
9491            let val = buf.get_f32_le();
9492            *v = val;
9493        }
9494        for v in &mut __struct.command {
9495            let val = buf.get_u16_le();
9496            *v = val;
9497        }
9498        __struct.valid_points = buf.get_u8();
9499        Ok(__struct)
9500    }
9501    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9502        let mut __tmp = BytesMut::new(bytes);
9503        #[allow(clippy::absurd_extreme_comparisons)]
9504        #[allow(unused_comparisons)]
9505        if __tmp.remaining() < Self::ENCODED_LEN {
9506            panic!(
9507                "buffer is too small (need {} bytes, but got {})",
9508                Self::ENCODED_LEN,
9509                __tmp.remaining(),
9510            )
9511        }
9512        __tmp.put_u64_le(self.time_usec);
9513        for val in &self.pos_x {
9514            __tmp.put_f32_le(*val);
9515        }
9516        for val in &self.pos_y {
9517            __tmp.put_f32_le(*val);
9518        }
9519        for val in &self.pos_z {
9520            __tmp.put_f32_le(*val);
9521        }
9522        for val in &self.vel_x {
9523            __tmp.put_f32_le(*val);
9524        }
9525        for val in &self.vel_y {
9526            __tmp.put_f32_le(*val);
9527        }
9528        for val in &self.vel_z {
9529            __tmp.put_f32_le(*val);
9530        }
9531        for val in &self.acc_x {
9532            __tmp.put_f32_le(*val);
9533        }
9534        for val in &self.acc_y {
9535            __tmp.put_f32_le(*val);
9536        }
9537        for val in &self.acc_z {
9538            __tmp.put_f32_le(*val);
9539        }
9540        for val in &self.pos_yaw {
9541            __tmp.put_f32_le(*val);
9542        }
9543        for val in &self.vel_yaw {
9544            __tmp.put_f32_le(*val);
9545        }
9546        for val in &self.command {
9547            __tmp.put_u16_le(*val);
9548        }
9549        __tmp.put_u8(self.valid_points);
9550        if matches!(version, MavlinkVersion::V2) {
9551            let len = __tmp.len();
9552            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9553        } else {
9554            __tmp.len()
9555        }
9556    }
9557}
9558#[doc = "id: 322"]
9559#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
9560#[derive(Debug, Clone, PartialEq)]
9561#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9562#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9563pub struct PARAM_EXT_VALUE_DATA {
9564    #[doc = "Total number of parameters"]
9565    pub param_count: u16,
9566    #[doc = "Index of this parameter"]
9567    pub param_index: u16,
9568    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
9569    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9570    pub param_id: [u8; 16],
9571    #[doc = "Parameter value"]
9572    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9573    pub param_value: [u8; 128],
9574    #[doc = "Parameter type."]
9575    pub param_type: MavParamExtType,
9576}
9577impl PARAM_EXT_VALUE_DATA {
9578    pub const ENCODED_LEN: usize = 149usize;
9579    pub const DEFAULT: Self = Self {
9580        param_count: 0_u16,
9581        param_index: 0_u16,
9582        param_id: [0_u8; 16usize],
9583        param_value: [0_u8; 128usize],
9584        param_type: MavParamExtType::DEFAULT,
9585    };
9586    #[cfg(feature = "arbitrary")]
9587    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9588        use arbitrary::{Arbitrary, Unstructured};
9589        let mut buf = [0u8; 1024];
9590        rng.fill_bytes(&mut buf);
9591        let mut unstructured = Unstructured::new(&buf);
9592        Self::arbitrary(&mut unstructured).unwrap_or_default()
9593    }
9594}
9595impl Default for PARAM_EXT_VALUE_DATA {
9596    fn default() -> Self {
9597        Self::DEFAULT.clone()
9598    }
9599}
9600impl MessageData for PARAM_EXT_VALUE_DATA {
9601    type Message = MavMessage;
9602    const ID: u32 = 322u32;
9603    const NAME: &'static str = "PARAM_EXT_VALUE";
9604    const EXTRA_CRC: u8 = 243u8;
9605    const ENCODED_LEN: usize = 149usize;
9606    fn deser(
9607        _version: MavlinkVersion,
9608        __input: &[u8],
9609    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9610        let avail_len = __input.len();
9611        let mut payload_buf = [0; Self::ENCODED_LEN];
9612        let mut buf = if avail_len < Self::ENCODED_LEN {
9613            payload_buf[0..avail_len].copy_from_slice(__input);
9614            Bytes::new(&payload_buf)
9615        } else {
9616            Bytes::new(__input)
9617        };
9618        let mut __struct = Self::default();
9619        __struct.param_count = buf.get_u16_le();
9620        __struct.param_index = buf.get_u16_le();
9621        for v in &mut __struct.param_id {
9622            let val = buf.get_u8();
9623            *v = val;
9624        }
9625        for v in &mut __struct.param_value {
9626            let val = buf.get_u8();
9627            *v = val;
9628        }
9629        let tmp = buf.get_u8();
9630        __struct.param_type =
9631            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9632                enum_type: "MavParamExtType",
9633                value: tmp as u32,
9634            })?;
9635        Ok(__struct)
9636    }
9637    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9638        let mut __tmp = BytesMut::new(bytes);
9639        #[allow(clippy::absurd_extreme_comparisons)]
9640        #[allow(unused_comparisons)]
9641        if __tmp.remaining() < Self::ENCODED_LEN {
9642            panic!(
9643                "buffer is too small (need {} bytes, but got {})",
9644                Self::ENCODED_LEN,
9645                __tmp.remaining(),
9646            )
9647        }
9648        __tmp.put_u16_le(self.param_count);
9649        __tmp.put_u16_le(self.param_index);
9650        for val in &self.param_id {
9651            __tmp.put_u8(*val);
9652        }
9653        for val in &self.param_value {
9654            __tmp.put_u8(*val);
9655        }
9656        __tmp.put_u8(self.param_type as u8);
9657        if matches!(version, MavlinkVersion::V2) {
9658            let len = __tmp.len();
9659            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9660        } else {
9661            __tmp.len()
9662        }
9663    }
9664}
9665#[doc = "id: 397"]
9666#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
9667#[derive(Debug, Clone, PartialEq)]
9668#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9669#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9670pub struct COMPONENT_METADATA_DATA {
9671    #[doc = "Timestamp (time since system boot)."]
9672    pub time_boot_ms: u32,
9673    #[doc = "CRC32 of the general metadata file."]
9674    pub file_crc: u32,
9675    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9676    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9677    pub uri: [u8; 100],
9678}
9679impl COMPONENT_METADATA_DATA {
9680    pub const ENCODED_LEN: usize = 108usize;
9681    pub const DEFAULT: Self = Self {
9682        time_boot_ms: 0_u32,
9683        file_crc: 0_u32,
9684        uri: [0_u8; 100usize],
9685    };
9686    #[cfg(feature = "arbitrary")]
9687    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9688        use arbitrary::{Arbitrary, Unstructured};
9689        let mut buf = [0u8; 1024];
9690        rng.fill_bytes(&mut buf);
9691        let mut unstructured = Unstructured::new(&buf);
9692        Self::arbitrary(&mut unstructured).unwrap_or_default()
9693    }
9694}
9695impl Default for COMPONENT_METADATA_DATA {
9696    fn default() -> Self {
9697        Self::DEFAULT.clone()
9698    }
9699}
9700impl MessageData for COMPONENT_METADATA_DATA {
9701    type Message = MavMessage;
9702    const ID: u32 = 397u32;
9703    const NAME: &'static str = "COMPONENT_METADATA";
9704    const EXTRA_CRC: u8 = 182u8;
9705    const ENCODED_LEN: usize = 108usize;
9706    fn deser(
9707        _version: MavlinkVersion,
9708        __input: &[u8],
9709    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9710        let avail_len = __input.len();
9711        let mut payload_buf = [0; Self::ENCODED_LEN];
9712        let mut buf = if avail_len < Self::ENCODED_LEN {
9713            payload_buf[0..avail_len].copy_from_slice(__input);
9714            Bytes::new(&payload_buf)
9715        } else {
9716            Bytes::new(__input)
9717        };
9718        let mut __struct = Self::default();
9719        __struct.time_boot_ms = buf.get_u32_le();
9720        __struct.file_crc = buf.get_u32_le();
9721        for v in &mut __struct.uri {
9722            let val = buf.get_u8();
9723            *v = val;
9724        }
9725        Ok(__struct)
9726    }
9727    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9728        let mut __tmp = BytesMut::new(bytes);
9729        #[allow(clippy::absurd_extreme_comparisons)]
9730        #[allow(unused_comparisons)]
9731        if __tmp.remaining() < Self::ENCODED_LEN {
9732            panic!(
9733                "buffer is too small (need {} bytes, but got {})",
9734                Self::ENCODED_LEN,
9735                __tmp.remaining(),
9736            )
9737        }
9738        __tmp.put_u32_le(self.time_boot_ms);
9739        __tmp.put_u32_le(self.file_crc);
9740        for val in &self.uri {
9741            __tmp.put_u8(*val);
9742        }
9743        if matches!(version, MavlinkVersion::V2) {
9744            let len = __tmp.len();
9745            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9746        } else {
9747            __tmp.len()
9748        }
9749    }
9750}
9751#[doc = "id: 136"]
9752#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
9753#[derive(Debug, Clone, PartialEq)]
9754#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9755#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9756pub struct TERRAIN_REPORT_DATA {
9757    #[doc = "Latitude"]
9758    pub lat: i32,
9759    #[doc = "Longitude"]
9760    pub lon: i32,
9761    #[doc = "Terrain height MSL"]
9762    pub terrain_height: f32,
9763    #[doc = "Current vehicle height above lat/lon terrain height"]
9764    pub current_height: f32,
9765    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
9766    pub spacing: u16,
9767    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
9768    pub pending: u16,
9769    #[doc = "Number of 4x4 terrain blocks in memory"]
9770    pub loaded: u16,
9771}
9772impl TERRAIN_REPORT_DATA {
9773    pub const ENCODED_LEN: usize = 22usize;
9774    pub const DEFAULT: Self = Self {
9775        lat: 0_i32,
9776        lon: 0_i32,
9777        terrain_height: 0.0_f32,
9778        current_height: 0.0_f32,
9779        spacing: 0_u16,
9780        pending: 0_u16,
9781        loaded: 0_u16,
9782    };
9783    #[cfg(feature = "arbitrary")]
9784    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9785        use arbitrary::{Arbitrary, Unstructured};
9786        let mut buf = [0u8; 1024];
9787        rng.fill_bytes(&mut buf);
9788        let mut unstructured = Unstructured::new(&buf);
9789        Self::arbitrary(&mut unstructured).unwrap_or_default()
9790    }
9791}
9792impl Default for TERRAIN_REPORT_DATA {
9793    fn default() -> Self {
9794        Self::DEFAULT.clone()
9795    }
9796}
9797impl MessageData for TERRAIN_REPORT_DATA {
9798    type Message = MavMessage;
9799    const ID: u32 = 136u32;
9800    const NAME: &'static str = "TERRAIN_REPORT";
9801    const EXTRA_CRC: u8 = 1u8;
9802    const ENCODED_LEN: usize = 22usize;
9803    fn deser(
9804        _version: MavlinkVersion,
9805        __input: &[u8],
9806    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9807        let avail_len = __input.len();
9808        let mut payload_buf = [0; Self::ENCODED_LEN];
9809        let mut buf = if avail_len < Self::ENCODED_LEN {
9810            payload_buf[0..avail_len].copy_from_slice(__input);
9811            Bytes::new(&payload_buf)
9812        } else {
9813            Bytes::new(__input)
9814        };
9815        let mut __struct = Self::default();
9816        __struct.lat = buf.get_i32_le();
9817        __struct.lon = buf.get_i32_le();
9818        __struct.terrain_height = buf.get_f32_le();
9819        __struct.current_height = buf.get_f32_le();
9820        __struct.spacing = buf.get_u16_le();
9821        __struct.pending = buf.get_u16_le();
9822        __struct.loaded = buf.get_u16_le();
9823        Ok(__struct)
9824    }
9825    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9826        let mut __tmp = BytesMut::new(bytes);
9827        #[allow(clippy::absurd_extreme_comparisons)]
9828        #[allow(unused_comparisons)]
9829        if __tmp.remaining() < Self::ENCODED_LEN {
9830            panic!(
9831                "buffer is too small (need {} bytes, but got {})",
9832                Self::ENCODED_LEN,
9833                __tmp.remaining(),
9834            )
9835        }
9836        __tmp.put_i32_le(self.lat);
9837        __tmp.put_i32_le(self.lon);
9838        __tmp.put_f32_le(self.terrain_height);
9839        __tmp.put_f32_le(self.current_height);
9840        __tmp.put_u16_le(self.spacing);
9841        __tmp.put_u16_le(self.pending);
9842        __tmp.put_u16_le(self.loaded);
9843        if matches!(version, MavlinkVersion::V2) {
9844            let len = __tmp.len();
9845            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9846        } else {
9847            __tmp.len()
9848        }
9849    }
9850}
9851#[doc = "id: 147"]
9852#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
9853#[derive(Debug, Clone, PartialEq)]
9854#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9855#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9856pub struct BATTERY_STATUS_DATA {
9857    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
9858    pub current_consumed: i32,
9859    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
9860    pub energy_consumed: i32,
9861    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
9862    pub temperature: i16,
9863    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
9864    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9865    pub voltages: [u16; 10],
9866    #[doc = "Battery current, -1: autopilot does not measure the current"]
9867    pub current_battery: i16,
9868    #[doc = "Battery ID"]
9869    pub id: u8,
9870    #[doc = "Function of the battery"]
9871    pub battery_function: MavBatteryFunction,
9872    #[doc = "Type (chemistry) of the battery"]
9873    pub mavtype: MavBatteryType,
9874    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
9875    pub battery_remaining: i8,
9876    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
9877    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9878    pub time_remaining: i32,
9879    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
9880    #[cfg_attr(feature = "serde", serde(default))]
9881    pub charge_state: MavBatteryChargeState,
9882    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
9883    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9884    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9885    pub voltages_ext: [u16; 4],
9886    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
9887    #[cfg_attr(feature = "serde", serde(default))]
9888    pub mode: MavBatteryMode,
9889    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
9890    #[cfg_attr(feature = "serde", serde(default))]
9891    pub fault_bitmask: MavBatteryFault,
9892}
9893impl BATTERY_STATUS_DATA {
9894    pub const ENCODED_LEN: usize = 54usize;
9895    pub const DEFAULT: Self = Self {
9896        current_consumed: 0_i32,
9897        energy_consumed: 0_i32,
9898        temperature: 0_i16,
9899        voltages: [0_u16; 10usize],
9900        current_battery: 0_i16,
9901        id: 0_u8,
9902        battery_function: MavBatteryFunction::DEFAULT,
9903        mavtype: MavBatteryType::DEFAULT,
9904        battery_remaining: 0_i8,
9905        time_remaining: 0_i32,
9906        charge_state: MavBatteryChargeState::DEFAULT,
9907        voltages_ext: [0_u16; 4usize],
9908        mode: MavBatteryMode::DEFAULT,
9909        fault_bitmask: MavBatteryFault::DEFAULT,
9910    };
9911    #[cfg(feature = "arbitrary")]
9912    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9913        use arbitrary::{Arbitrary, Unstructured};
9914        let mut buf = [0u8; 1024];
9915        rng.fill_bytes(&mut buf);
9916        let mut unstructured = Unstructured::new(&buf);
9917        Self::arbitrary(&mut unstructured).unwrap_or_default()
9918    }
9919}
9920impl Default for BATTERY_STATUS_DATA {
9921    fn default() -> Self {
9922        Self::DEFAULT.clone()
9923    }
9924}
9925impl MessageData for BATTERY_STATUS_DATA {
9926    type Message = MavMessage;
9927    const ID: u32 = 147u32;
9928    const NAME: &'static str = "BATTERY_STATUS";
9929    const EXTRA_CRC: u8 = 154u8;
9930    const ENCODED_LEN: usize = 54usize;
9931    fn deser(
9932        _version: MavlinkVersion,
9933        __input: &[u8],
9934    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9935        let avail_len = __input.len();
9936        let mut payload_buf = [0; Self::ENCODED_LEN];
9937        let mut buf = if avail_len < Self::ENCODED_LEN {
9938            payload_buf[0..avail_len].copy_from_slice(__input);
9939            Bytes::new(&payload_buf)
9940        } else {
9941            Bytes::new(__input)
9942        };
9943        let mut __struct = Self::default();
9944        __struct.current_consumed = buf.get_i32_le();
9945        __struct.energy_consumed = buf.get_i32_le();
9946        __struct.temperature = buf.get_i16_le();
9947        for v in &mut __struct.voltages {
9948            let val = buf.get_u16_le();
9949            *v = val;
9950        }
9951        __struct.current_battery = buf.get_i16_le();
9952        __struct.id = buf.get_u8();
9953        let tmp = buf.get_u8();
9954        __struct.battery_function =
9955            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9956                enum_type: "MavBatteryFunction",
9957                value: tmp as u32,
9958            })?;
9959        let tmp = buf.get_u8();
9960        __struct.mavtype =
9961            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9962                enum_type: "MavBatteryType",
9963                value: tmp as u32,
9964            })?;
9965        __struct.battery_remaining = buf.get_i8();
9966        __struct.time_remaining = buf.get_i32_le();
9967        let tmp = buf.get_u8();
9968        __struct.charge_state =
9969            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9970                enum_type: "MavBatteryChargeState",
9971                value: tmp as u32,
9972            })?;
9973        for v in &mut __struct.voltages_ext {
9974            let val = buf.get_u16_le();
9975            *v = val;
9976        }
9977        let tmp = buf.get_u8();
9978        __struct.mode =
9979            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9980                enum_type: "MavBatteryMode",
9981                value: tmp as u32,
9982            })?;
9983        let tmp = buf.get_u32_le();
9984        __struct.fault_bitmask = MavBatteryFault::from_bits(tmp & MavBatteryFault::all().bits())
9985            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
9986                flag_type: "MavBatteryFault",
9987                value: tmp as u32,
9988            })?;
9989        Ok(__struct)
9990    }
9991    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9992        let mut __tmp = BytesMut::new(bytes);
9993        #[allow(clippy::absurd_extreme_comparisons)]
9994        #[allow(unused_comparisons)]
9995        if __tmp.remaining() < Self::ENCODED_LEN {
9996            panic!(
9997                "buffer is too small (need {} bytes, but got {})",
9998                Self::ENCODED_LEN,
9999                __tmp.remaining(),
10000            )
10001        }
10002        __tmp.put_i32_le(self.current_consumed);
10003        __tmp.put_i32_le(self.energy_consumed);
10004        __tmp.put_i16_le(self.temperature);
10005        for val in &self.voltages {
10006            __tmp.put_u16_le(*val);
10007        }
10008        __tmp.put_i16_le(self.current_battery);
10009        __tmp.put_u8(self.id);
10010        __tmp.put_u8(self.battery_function as u8);
10011        __tmp.put_u8(self.mavtype as u8);
10012        __tmp.put_i8(self.battery_remaining);
10013        __tmp.put_i32_le(self.time_remaining);
10014        __tmp.put_u8(self.charge_state as u8);
10015        for val in &self.voltages_ext {
10016            __tmp.put_u16_le(*val);
10017        }
10018        __tmp.put_u8(self.mode as u8);
10019        __tmp.put_u32_le(self.fault_bitmask.bits());
10020        if matches!(version, MavlinkVersion::V2) {
10021            let len = __tmp.len();
10022            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10023        } else {
10024            __tmp.len()
10025        }
10026    }
10027}
10028#[doc = "id: 235"]
10029#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
10030#[derive(Debug, Clone, PartialEq)]
10031#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10032#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10033pub struct HIGH_LATENCY2_DATA {
10034    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
10035    pub timestamp: u32,
10036    #[doc = "Latitude"]
10037    pub latitude: i32,
10038    #[doc = "Longitude"]
10039    pub longitude: i32,
10040    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
10041    pub custom_mode: u16,
10042    #[doc = "Altitude above mean sea level"]
10043    pub altitude: i16,
10044    #[doc = "Altitude setpoint"]
10045    pub target_altitude: i16,
10046    #[doc = "Distance to target waypoint or position"]
10047    pub target_distance: u16,
10048    #[doc = "Current waypoint number"]
10049    pub wp_num: u16,
10050    #[doc = "Bitmap of failure flags."]
10051    pub failure_flags: HlFailureFlag,
10052    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
10053    pub mavtype: MavType,
10054    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
10055    pub autopilot: MavAutopilot,
10056    #[doc = "Heading"]
10057    pub heading: u8,
10058    #[doc = "Heading setpoint"]
10059    pub target_heading: u8,
10060    #[doc = "Throttle"]
10061    pub throttle: u8,
10062    #[doc = "Airspeed"]
10063    pub airspeed: u8,
10064    #[doc = "Airspeed setpoint"]
10065    pub airspeed_sp: u8,
10066    #[doc = "Groundspeed"]
10067    pub groundspeed: u8,
10068    #[doc = "Windspeed"]
10069    pub windspeed: u8,
10070    #[doc = "Wind heading"]
10071    pub wind_heading: u8,
10072    #[doc = "Maximum error horizontal position since last message"]
10073    pub eph: u8,
10074    #[doc = "Maximum error vertical position since last message"]
10075    pub epv: u8,
10076    #[doc = "Air temperature"]
10077    pub temperature_air: i8,
10078    #[doc = "Maximum climb rate magnitude since last message"]
10079    pub climb_rate: i8,
10080    #[doc = "Battery level (-1 if field not provided)."]
10081    pub battery: i8,
10082    #[doc = "Field for custom payload."]
10083    pub custom0: i8,
10084    #[doc = "Field for custom payload."]
10085    pub custom1: i8,
10086    #[doc = "Field for custom payload."]
10087    pub custom2: i8,
10088}
10089impl HIGH_LATENCY2_DATA {
10090    pub const ENCODED_LEN: usize = 42usize;
10091    pub const DEFAULT: Self = Self {
10092        timestamp: 0_u32,
10093        latitude: 0_i32,
10094        longitude: 0_i32,
10095        custom_mode: 0_u16,
10096        altitude: 0_i16,
10097        target_altitude: 0_i16,
10098        target_distance: 0_u16,
10099        wp_num: 0_u16,
10100        failure_flags: HlFailureFlag::DEFAULT,
10101        mavtype: MavType::DEFAULT,
10102        autopilot: MavAutopilot::DEFAULT,
10103        heading: 0_u8,
10104        target_heading: 0_u8,
10105        throttle: 0_u8,
10106        airspeed: 0_u8,
10107        airspeed_sp: 0_u8,
10108        groundspeed: 0_u8,
10109        windspeed: 0_u8,
10110        wind_heading: 0_u8,
10111        eph: 0_u8,
10112        epv: 0_u8,
10113        temperature_air: 0_i8,
10114        climb_rate: 0_i8,
10115        battery: 0_i8,
10116        custom0: 0_i8,
10117        custom1: 0_i8,
10118        custom2: 0_i8,
10119    };
10120    #[cfg(feature = "arbitrary")]
10121    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10122        use arbitrary::{Arbitrary, Unstructured};
10123        let mut buf = [0u8; 1024];
10124        rng.fill_bytes(&mut buf);
10125        let mut unstructured = Unstructured::new(&buf);
10126        Self::arbitrary(&mut unstructured).unwrap_or_default()
10127    }
10128}
10129impl Default for HIGH_LATENCY2_DATA {
10130    fn default() -> Self {
10131        Self::DEFAULT.clone()
10132    }
10133}
10134impl MessageData for HIGH_LATENCY2_DATA {
10135    type Message = MavMessage;
10136    const ID: u32 = 235u32;
10137    const NAME: &'static str = "HIGH_LATENCY2";
10138    const EXTRA_CRC: u8 = 179u8;
10139    const ENCODED_LEN: usize = 42usize;
10140    fn deser(
10141        _version: MavlinkVersion,
10142        __input: &[u8],
10143    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10144        let avail_len = __input.len();
10145        let mut payload_buf = [0; Self::ENCODED_LEN];
10146        let mut buf = if avail_len < Self::ENCODED_LEN {
10147            payload_buf[0..avail_len].copy_from_slice(__input);
10148            Bytes::new(&payload_buf)
10149        } else {
10150            Bytes::new(__input)
10151        };
10152        let mut __struct = Self::default();
10153        __struct.timestamp = buf.get_u32_le();
10154        __struct.latitude = buf.get_i32_le();
10155        __struct.longitude = buf.get_i32_le();
10156        __struct.custom_mode = buf.get_u16_le();
10157        __struct.altitude = buf.get_i16_le();
10158        __struct.target_altitude = buf.get_i16_le();
10159        __struct.target_distance = buf.get_u16_le();
10160        __struct.wp_num = buf.get_u16_le();
10161        let tmp = buf.get_u16_le();
10162        __struct.failure_flags = HlFailureFlag::from_bits(tmp & HlFailureFlag::all().bits())
10163            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
10164                flag_type: "HlFailureFlag",
10165                value: tmp as u32,
10166            })?;
10167        let tmp = buf.get_u8();
10168        __struct.mavtype =
10169            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10170                enum_type: "MavType",
10171                value: tmp as u32,
10172            })?;
10173        let tmp = buf.get_u8();
10174        __struct.autopilot =
10175            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10176                enum_type: "MavAutopilot",
10177                value: tmp as u32,
10178            })?;
10179        __struct.heading = buf.get_u8();
10180        __struct.target_heading = buf.get_u8();
10181        __struct.throttle = buf.get_u8();
10182        __struct.airspeed = buf.get_u8();
10183        __struct.airspeed_sp = buf.get_u8();
10184        __struct.groundspeed = buf.get_u8();
10185        __struct.windspeed = buf.get_u8();
10186        __struct.wind_heading = buf.get_u8();
10187        __struct.eph = buf.get_u8();
10188        __struct.epv = buf.get_u8();
10189        __struct.temperature_air = buf.get_i8();
10190        __struct.climb_rate = buf.get_i8();
10191        __struct.battery = buf.get_i8();
10192        __struct.custom0 = buf.get_i8();
10193        __struct.custom1 = buf.get_i8();
10194        __struct.custom2 = buf.get_i8();
10195        Ok(__struct)
10196    }
10197    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10198        let mut __tmp = BytesMut::new(bytes);
10199        #[allow(clippy::absurd_extreme_comparisons)]
10200        #[allow(unused_comparisons)]
10201        if __tmp.remaining() < Self::ENCODED_LEN {
10202            panic!(
10203                "buffer is too small (need {} bytes, but got {})",
10204                Self::ENCODED_LEN,
10205                __tmp.remaining(),
10206            )
10207        }
10208        __tmp.put_u32_le(self.timestamp);
10209        __tmp.put_i32_le(self.latitude);
10210        __tmp.put_i32_le(self.longitude);
10211        __tmp.put_u16_le(self.custom_mode);
10212        __tmp.put_i16_le(self.altitude);
10213        __tmp.put_i16_le(self.target_altitude);
10214        __tmp.put_u16_le(self.target_distance);
10215        __tmp.put_u16_le(self.wp_num);
10216        __tmp.put_u16_le(self.failure_flags.bits());
10217        __tmp.put_u8(self.mavtype as u8);
10218        __tmp.put_u8(self.autopilot as u8);
10219        __tmp.put_u8(self.heading);
10220        __tmp.put_u8(self.target_heading);
10221        __tmp.put_u8(self.throttle);
10222        __tmp.put_u8(self.airspeed);
10223        __tmp.put_u8(self.airspeed_sp);
10224        __tmp.put_u8(self.groundspeed);
10225        __tmp.put_u8(self.windspeed);
10226        __tmp.put_u8(self.wind_heading);
10227        __tmp.put_u8(self.eph);
10228        __tmp.put_u8(self.epv);
10229        __tmp.put_i8(self.temperature_air);
10230        __tmp.put_i8(self.climb_rate);
10231        __tmp.put_i8(self.battery);
10232        __tmp.put_i8(self.custom0);
10233        __tmp.put_i8(self.custom1);
10234        __tmp.put_i8(self.custom2);
10235        if matches!(version, MavlinkVersion::V2) {
10236            let len = __tmp.len();
10237            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10238        } else {
10239            __tmp.len()
10240        }
10241    }
10242}
10243#[doc = "id: 86"]
10244#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
10245#[derive(Debug, Clone, PartialEq)]
10246#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10247#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10248pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
10249    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
10250    pub time_boot_ms: u32,
10251    #[doc = "Latitude in WGS84 frame"]
10252    pub lat_int: i32,
10253    #[doc = "Longitude in WGS84 frame"]
10254    pub lon_int: i32,
10255    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
10256    pub alt: f32,
10257    #[doc = "X velocity in NED frame"]
10258    pub vx: f32,
10259    #[doc = "Y velocity in NED frame"]
10260    pub vy: f32,
10261    #[doc = "Z velocity in NED frame"]
10262    pub vz: f32,
10263    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
10264    pub afx: f32,
10265    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
10266    pub afy: f32,
10267    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
10268    pub afz: f32,
10269    #[doc = "yaw setpoint"]
10270    pub yaw: f32,
10271    #[doc = "yaw rate setpoint"]
10272    pub yaw_rate: f32,
10273    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
10274    pub type_mask: PositionTargetTypemask,
10275    #[doc = "System ID"]
10276    pub target_system: u8,
10277    #[doc = "Component ID"]
10278    pub target_component: u8,
10279    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
10280    pub coordinate_frame: MavFrame,
10281}
10282impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
10283    pub const ENCODED_LEN: usize = 53usize;
10284    pub const DEFAULT: Self = Self {
10285        time_boot_ms: 0_u32,
10286        lat_int: 0_i32,
10287        lon_int: 0_i32,
10288        alt: 0.0_f32,
10289        vx: 0.0_f32,
10290        vy: 0.0_f32,
10291        vz: 0.0_f32,
10292        afx: 0.0_f32,
10293        afy: 0.0_f32,
10294        afz: 0.0_f32,
10295        yaw: 0.0_f32,
10296        yaw_rate: 0.0_f32,
10297        type_mask: PositionTargetTypemask::DEFAULT,
10298        target_system: 0_u8,
10299        target_component: 0_u8,
10300        coordinate_frame: MavFrame::DEFAULT,
10301    };
10302    #[cfg(feature = "arbitrary")]
10303    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10304        use arbitrary::{Arbitrary, Unstructured};
10305        let mut buf = [0u8; 1024];
10306        rng.fill_bytes(&mut buf);
10307        let mut unstructured = Unstructured::new(&buf);
10308        Self::arbitrary(&mut unstructured).unwrap_or_default()
10309    }
10310}
10311impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
10312    fn default() -> Self {
10313        Self::DEFAULT.clone()
10314    }
10315}
10316impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
10317    type Message = MavMessage;
10318    const ID: u32 = 86u32;
10319    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
10320    const EXTRA_CRC: u8 = 5u8;
10321    const ENCODED_LEN: usize = 53usize;
10322    fn deser(
10323        _version: MavlinkVersion,
10324        __input: &[u8],
10325    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10326        let avail_len = __input.len();
10327        let mut payload_buf = [0; Self::ENCODED_LEN];
10328        let mut buf = if avail_len < Self::ENCODED_LEN {
10329            payload_buf[0..avail_len].copy_from_slice(__input);
10330            Bytes::new(&payload_buf)
10331        } else {
10332            Bytes::new(__input)
10333        };
10334        let mut __struct = Self::default();
10335        __struct.time_boot_ms = buf.get_u32_le();
10336        __struct.lat_int = buf.get_i32_le();
10337        __struct.lon_int = buf.get_i32_le();
10338        __struct.alt = buf.get_f32_le();
10339        __struct.vx = buf.get_f32_le();
10340        __struct.vy = buf.get_f32_le();
10341        __struct.vz = buf.get_f32_le();
10342        __struct.afx = buf.get_f32_le();
10343        __struct.afy = buf.get_f32_le();
10344        __struct.afz = buf.get_f32_le();
10345        __struct.yaw = buf.get_f32_le();
10346        __struct.yaw_rate = buf.get_f32_le();
10347        let tmp = buf.get_u16_le();
10348        __struct.type_mask = PositionTargetTypemask::from_bits(
10349            tmp & PositionTargetTypemask::all().bits(),
10350        )
10351        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
10352            flag_type: "PositionTargetTypemask",
10353            value: tmp as u32,
10354        })?;
10355        __struct.target_system = buf.get_u8();
10356        __struct.target_component = buf.get_u8();
10357        let tmp = buf.get_u8();
10358        __struct.coordinate_frame =
10359            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10360                enum_type: "MavFrame",
10361                value: tmp as u32,
10362            })?;
10363        Ok(__struct)
10364    }
10365    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10366        let mut __tmp = BytesMut::new(bytes);
10367        #[allow(clippy::absurd_extreme_comparisons)]
10368        #[allow(unused_comparisons)]
10369        if __tmp.remaining() < Self::ENCODED_LEN {
10370            panic!(
10371                "buffer is too small (need {} bytes, but got {})",
10372                Self::ENCODED_LEN,
10373                __tmp.remaining(),
10374            )
10375        }
10376        __tmp.put_u32_le(self.time_boot_ms);
10377        __tmp.put_i32_le(self.lat_int);
10378        __tmp.put_i32_le(self.lon_int);
10379        __tmp.put_f32_le(self.alt);
10380        __tmp.put_f32_le(self.vx);
10381        __tmp.put_f32_le(self.vy);
10382        __tmp.put_f32_le(self.vz);
10383        __tmp.put_f32_le(self.afx);
10384        __tmp.put_f32_le(self.afy);
10385        __tmp.put_f32_le(self.afz);
10386        __tmp.put_f32_le(self.yaw);
10387        __tmp.put_f32_le(self.yaw_rate);
10388        __tmp.put_u16_le(self.type_mask.bits());
10389        __tmp.put_u8(self.target_system);
10390        __tmp.put_u8(self.target_component);
10391        __tmp.put_u8(self.coordinate_frame as u8);
10392        if matches!(version, MavlinkVersion::V2) {
10393            let len = __tmp.len();
10394            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10395        } else {
10396            __tmp.len()
10397        }
10398    }
10399}
10400#[doc = "id: 83"]
10401#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
10402#[derive(Debug, Clone, PartialEq)]
10403#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10404#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10405pub struct ATTITUDE_TARGET_DATA {
10406    #[doc = "Timestamp (time since system boot)."]
10407    pub time_boot_ms: u32,
10408    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
10409    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10410    pub q: [f32; 4],
10411    #[doc = "Body roll rate"]
10412    pub body_roll_rate: f32,
10413    #[doc = "Body pitch rate"]
10414    pub body_pitch_rate: f32,
10415    #[doc = "Body yaw rate"]
10416    pub body_yaw_rate: f32,
10417    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
10418    pub thrust: f32,
10419    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
10420    pub type_mask: AttitudeTargetTypemask,
10421}
10422impl ATTITUDE_TARGET_DATA {
10423    pub const ENCODED_LEN: usize = 37usize;
10424    pub const DEFAULT: Self = Self {
10425        time_boot_ms: 0_u32,
10426        q: [0.0_f32; 4usize],
10427        body_roll_rate: 0.0_f32,
10428        body_pitch_rate: 0.0_f32,
10429        body_yaw_rate: 0.0_f32,
10430        thrust: 0.0_f32,
10431        type_mask: AttitudeTargetTypemask::DEFAULT,
10432    };
10433    #[cfg(feature = "arbitrary")]
10434    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10435        use arbitrary::{Arbitrary, Unstructured};
10436        let mut buf = [0u8; 1024];
10437        rng.fill_bytes(&mut buf);
10438        let mut unstructured = Unstructured::new(&buf);
10439        Self::arbitrary(&mut unstructured).unwrap_or_default()
10440    }
10441}
10442impl Default for ATTITUDE_TARGET_DATA {
10443    fn default() -> Self {
10444        Self::DEFAULT.clone()
10445    }
10446}
10447impl MessageData for ATTITUDE_TARGET_DATA {
10448    type Message = MavMessage;
10449    const ID: u32 = 83u32;
10450    const NAME: &'static str = "ATTITUDE_TARGET";
10451    const EXTRA_CRC: u8 = 22u8;
10452    const ENCODED_LEN: usize = 37usize;
10453    fn deser(
10454        _version: MavlinkVersion,
10455        __input: &[u8],
10456    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10457        let avail_len = __input.len();
10458        let mut payload_buf = [0; Self::ENCODED_LEN];
10459        let mut buf = if avail_len < Self::ENCODED_LEN {
10460            payload_buf[0..avail_len].copy_from_slice(__input);
10461            Bytes::new(&payload_buf)
10462        } else {
10463            Bytes::new(__input)
10464        };
10465        let mut __struct = Self::default();
10466        __struct.time_boot_ms = buf.get_u32_le();
10467        for v in &mut __struct.q {
10468            let val = buf.get_f32_le();
10469            *v = val;
10470        }
10471        __struct.body_roll_rate = buf.get_f32_le();
10472        __struct.body_pitch_rate = buf.get_f32_le();
10473        __struct.body_yaw_rate = buf.get_f32_le();
10474        __struct.thrust = buf.get_f32_le();
10475        let tmp = buf.get_u8();
10476        __struct.type_mask = AttitudeTargetTypemask::from_bits(
10477            tmp & AttitudeTargetTypemask::all().bits(),
10478        )
10479        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
10480            flag_type: "AttitudeTargetTypemask",
10481            value: tmp as u32,
10482        })?;
10483        Ok(__struct)
10484    }
10485    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10486        let mut __tmp = BytesMut::new(bytes);
10487        #[allow(clippy::absurd_extreme_comparisons)]
10488        #[allow(unused_comparisons)]
10489        if __tmp.remaining() < Self::ENCODED_LEN {
10490            panic!(
10491                "buffer is too small (need {} bytes, but got {})",
10492                Self::ENCODED_LEN,
10493                __tmp.remaining(),
10494            )
10495        }
10496        __tmp.put_u32_le(self.time_boot_ms);
10497        for val in &self.q {
10498            __tmp.put_f32_le(*val);
10499        }
10500        __tmp.put_f32_le(self.body_roll_rate);
10501        __tmp.put_f32_le(self.body_pitch_rate);
10502        __tmp.put_f32_le(self.body_yaw_rate);
10503        __tmp.put_f32_le(self.thrust);
10504        __tmp.put_u8(self.type_mask.bits());
10505        if matches!(version, MavlinkVersion::V2) {
10506            let len = __tmp.len();
10507            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10508        } else {
10509            __tmp.len()
10510        }
10511    }
10512}
10513#[doc = "id: 30"]
10514#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
10515#[derive(Debug, Clone, PartialEq)]
10516#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10517#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10518pub struct ATTITUDE_DATA {
10519    #[doc = "Timestamp (time since system boot)."]
10520    pub time_boot_ms: u32,
10521    #[doc = "Roll angle (-pi..+pi)"]
10522    pub roll: f32,
10523    #[doc = "Pitch angle (-pi..+pi)"]
10524    pub pitch: f32,
10525    #[doc = "Yaw angle (-pi..+pi)"]
10526    pub yaw: f32,
10527    #[doc = "Roll angular speed"]
10528    pub rollspeed: f32,
10529    #[doc = "Pitch angular speed"]
10530    pub pitchspeed: f32,
10531    #[doc = "Yaw angular speed"]
10532    pub yawspeed: f32,
10533}
10534impl ATTITUDE_DATA {
10535    pub const ENCODED_LEN: usize = 28usize;
10536    pub const DEFAULT: Self = Self {
10537        time_boot_ms: 0_u32,
10538        roll: 0.0_f32,
10539        pitch: 0.0_f32,
10540        yaw: 0.0_f32,
10541        rollspeed: 0.0_f32,
10542        pitchspeed: 0.0_f32,
10543        yawspeed: 0.0_f32,
10544    };
10545    #[cfg(feature = "arbitrary")]
10546    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10547        use arbitrary::{Arbitrary, Unstructured};
10548        let mut buf = [0u8; 1024];
10549        rng.fill_bytes(&mut buf);
10550        let mut unstructured = Unstructured::new(&buf);
10551        Self::arbitrary(&mut unstructured).unwrap_or_default()
10552    }
10553}
10554impl Default for ATTITUDE_DATA {
10555    fn default() -> Self {
10556        Self::DEFAULT.clone()
10557    }
10558}
10559impl MessageData for ATTITUDE_DATA {
10560    type Message = MavMessage;
10561    const ID: u32 = 30u32;
10562    const NAME: &'static str = "ATTITUDE";
10563    const EXTRA_CRC: u8 = 39u8;
10564    const ENCODED_LEN: usize = 28usize;
10565    fn deser(
10566        _version: MavlinkVersion,
10567        __input: &[u8],
10568    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10569        let avail_len = __input.len();
10570        let mut payload_buf = [0; Self::ENCODED_LEN];
10571        let mut buf = if avail_len < Self::ENCODED_LEN {
10572            payload_buf[0..avail_len].copy_from_slice(__input);
10573            Bytes::new(&payload_buf)
10574        } else {
10575            Bytes::new(__input)
10576        };
10577        let mut __struct = Self::default();
10578        __struct.time_boot_ms = buf.get_u32_le();
10579        __struct.roll = buf.get_f32_le();
10580        __struct.pitch = buf.get_f32_le();
10581        __struct.yaw = buf.get_f32_le();
10582        __struct.rollspeed = buf.get_f32_le();
10583        __struct.pitchspeed = buf.get_f32_le();
10584        __struct.yawspeed = buf.get_f32_le();
10585        Ok(__struct)
10586    }
10587    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10588        let mut __tmp = BytesMut::new(bytes);
10589        #[allow(clippy::absurd_extreme_comparisons)]
10590        #[allow(unused_comparisons)]
10591        if __tmp.remaining() < Self::ENCODED_LEN {
10592            panic!(
10593                "buffer is too small (need {} bytes, but got {})",
10594                Self::ENCODED_LEN,
10595                __tmp.remaining(),
10596            )
10597        }
10598        __tmp.put_u32_le(self.time_boot_ms);
10599        __tmp.put_f32_le(self.roll);
10600        __tmp.put_f32_le(self.pitch);
10601        __tmp.put_f32_le(self.yaw);
10602        __tmp.put_f32_le(self.rollspeed);
10603        __tmp.put_f32_le(self.pitchspeed);
10604        __tmp.put_f32_le(self.yawspeed);
10605        if matches!(version, MavlinkVersion::V2) {
10606            let len = __tmp.len();
10607            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10608        } else {
10609            __tmp.len()
10610        }
10611    }
10612}
10613#[doc = "id: 134"]
10614#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
10615#[derive(Debug, Clone, PartialEq)]
10616#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10617#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10618pub struct TERRAIN_DATA_DATA {
10619    #[doc = "Latitude of SW corner of first grid"]
10620    pub lat: i32,
10621    #[doc = "Longitude of SW corner of first grid"]
10622    pub lon: i32,
10623    #[doc = "Grid spacing"]
10624    pub grid_spacing: u16,
10625    #[doc = "Terrain data MSL"]
10626    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10627    pub data: [i16; 16],
10628    #[doc = "bit within the terrain request mask"]
10629    pub gridbit: u8,
10630}
10631impl TERRAIN_DATA_DATA {
10632    pub const ENCODED_LEN: usize = 43usize;
10633    pub const DEFAULT: Self = Self {
10634        lat: 0_i32,
10635        lon: 0_i32,
10636        grid_spacing: 0_u16,
10637        data: [0_i16; 16usize],
10638        gridbit: 0_u8,
10639    };
10640    #[cfg(feature = "arbitrary")]
10641    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10642        use arbitrary::{Arbitrary, Unstructured};
10643        let mut buf = [0u8; 1024];
10644        rng.fill_bytes(&mut buf);
10645        let mut unstructured = Unstructured::new(&buf);
10646        Self::arbitrary(&mut unstructured).unwrap_or_default()
10647    }
10648}
10649impl Default for TERRAIN_DATA_DATA {
10650    fn default() -> Self {
10651        Self::DEFAULT.clone()
10652    }
10653}
10654impl MessageData for TERRAIN_DATA_DATA {
10655    type Message = MavMessage;
10656    const ID: u32 = 134u32;
10657    const NAME: &'static str = "TERRAIN_DATA";
10658    const EXTRA_CRC: u8 = 229u8;
10659    const ENCODED_LEN: usize = 43usize;
10660    fn deser(
10661        _version: MavlinkVersion,
10662        __input: &[u8],
10663    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10664        let avail_len = __input.len();
10665        let mut payload_buf = [0; Self::ENCODED_LEN];
10666        let mut buf = if avail_len < Self::ENCODED_LEN {
10667            payload_buf[0..avail_len].copy_from_slice(__input);
10668            Bytes::new(&payload_buf)
10669        } else {
10670            Bytes::new(__input)
10671        };
10672        let mut __struct = Self::default();
10673        __struct.lat = buf.get_i32_le();
10674        __struct.lon = buf.get_i32_le();
10675        __struct.grid_spacing = buf.get_u16_le();
10676        for v in &mut __struct.data {
10677            let val = buf.get_i16_le();
10678            *v = val;
10679        }
10680        __struct.gridbit = buf.get_u8();
10681        Ok(__struct)
10682    }
10683    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10684        let mut __tmp = BytesMut::new(bytes);
10685        #[allow(clippy::absurd_extreme_comparisons)]
10686        #[allow(unused_comparisons)]
10687        if __tmp.remaining() < Self::ENCODED_LEN {
10688            panic!(
10689                "buffer is too small (need {} bytes, but got {})",
10690                Self::ENCODED_LEN,
10691                __tmp.remaining(),
10692            )
10693        }
10694        __tmp.put_i32_le(self.lat);
10695        __tmp.put_i32_le(self.lon);
10696        __tmp.put_u16_le(self.grid_spacing);
10697        for val in &self.data {
10698            __tmp.put_i16_le(*val);
10699        }
10700        __tmp.put_u8(self.gridbit);
10701        if matches!(version, MavlinkVersion::V2) {
10702            let len = __tmp.len();
10703            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10704        } else {
10705            __tmp.len()
10706        }
10707    }
10708}
10709#[doc = "id: 54"]
10710#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
10711#[derive(Debug, Clone, PartialEq)]
10712#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10713#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10714pub struct SAFETY_SET_ALLOWED_AREA_DATA {
10715    #[doc = "x position 1 / Latitude 1"]
10716    pub p1x: f32,
10717    #[doc = "y position 1 / Longitude 1"]
10718    pub p1y: f32,
10719    #[doc = "z position 1 / Altitude 1"]
10720    pub p1z: f32,
10721    #[doc = "x position 2 / Latitude 2"]
10722    pub p2x: f32,
10723    #[doc = "y position 2 / Longitude 2"]
10724    pub p2y: f32,
10725    #[doc = "z position 2 / Altitude 2"]
10726    pub p2z: f32,
10727    #[doc = "System ID"]
10728    pub target_system: u8,
10729    #[doc = "Component ID"]
10730    pub target_component: u8,
10731    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
10732    pub frame: MavFrame,
10733}
10734impl SAFETY_SET_ALLOWED_AREA_DATA {
10735    pub const ENCODED_LEN: usize = 27usize;
10736    pub const DEFAULT: Self = Self {
10737        p1x: 0.0_f32,
10738        p1y: 0.0_f32,
10739        p1z: 0.0_f32,
10740        p2x: 0.0_f32,
10741        p2y: 0.0_f32,
10742        p2z: 0.0_f32,
10743        target_system: 0_u8,
10744        target_component: 0_u8,
10745        frame: MavFrame::DEFAULT,
10746    };
10747    #[cfg(feature = "arbitrary")]
10748    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10749        use arbitrary::{Arbitrary, Unstructured};
10750        let mut buf = [0u8; 1024];
10751        rng.fill_bytes(&mut buf);
10752        let mut unstructured = Unstructured::new(&buf);
10753        Self::arbitrary(&mut unstructured).unwrap_or_default()
10754    }
10755}
10756impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
10757    fn default() -> Self {
10758        Self::DEFAULT.clone()
10759    }
10760}
10761impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
10762    type Message = MavMessage;
10763    const ID: u32 = 54u32;
10764    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
10765    const EXTRA_CRC: u8 = 15u8;
10766    const ENCODED_LEN: usize = 27usize;
10767    fn deser(
10768        _version: MavlinkVersion,
10769        __input: &[u8],
10770    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10771        let avail_len = __input.len();
10772        let mut payload_buf = [0; Self::ENCODED_LEN];
10773        let mut buf = if avail_len < Self::ENCODED_LEN {
10774            payload_buf[0..avail_len].copy_from_slice(__input);
10775            Bytes::new(&payload_buf)
10776        } else {
10777            Bytes::new(__input)
10778        };
10779        let mut __struct = Self::default();
10780        __struct.p1x = buf.get_f32_le();
10781        __struct.p1y = buf.get_f32_le();
10782        __struct.p1z = buf.get_f32_le();
10783        __struct.p2x = buf.get_f32_le();
10784        __struct.p2y = buf.get_f32_le();
10785        __struct.p2z = buf.get_f32_le();
10786        __struct.target_system = buf.get_u8();
10787        __struct.target_component = buf.get_u8();
10788        let tmp = buf.get_u8();
10789        __struct.frame =
10790            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10791                enum_type: "MavFrame",
10792                value: tmp as u32,
10793            })?;
10794        Ok(__struct)
10795    }
10796    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10797        let mut __tmp = BytesMut::new(bytes);
10798        #[allow(clippy::absurd_extreme_comparisons)]
10799        #[allow(unused_comparisons)]
10800        if __tmp.remaining() < Self::ENCODED_LEN {
10801            panic!(
10802                "buffer is too small (need {} bytes, but got {})",
10803                Self::ENCODED_LEN,
10804                __tmp.remaining(),
10805            )
10806        }
10807        __tmp.put_f32_le(self.p1x);
10808        __tmp.put_f32_le(self.p1y);
10809        __tmp.put_f32_le(self.p1z);
10810        __tmp.put_f32_le(self.p2x);
10811        __tmp.put_f32_le(self.p2y);
10812        __tmp.put_f32_le(self.p2z);
10813        __tmp.put_u8(self.target_system);
10814        __tmp.put_u8(self.target_component);
10815        __tmp.put_u8(self.frame as u8);
10816        if matches!(version, MavlinkVersion::V2) {
10817            let len = __tmp.len();
10818            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10819        } else {
10820            __tmp.len()
10821        }
10822    }
10823}
10824#[doc = "id: 396"]
10825#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
10826#[derive(Debug, Clone, PartialEq)]
10827#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10828#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10829pub struct COMPONENT_INFORMATION_BASIC_DATA {
10830    #[doc = "Component capability flags"]
10831    pub capabilities: MavProtocolCapability,
10832    #[doc = "Timestamp (time since system boot)."]
10833    pub time_boot_ms: u32,
10834    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
10835    pub time_manufacture_s: u32,
10836    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
10837    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10838    pub vendor_name: [u8; 32],
10839    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
10840    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10841    pub model_name: [u8; 32],
10842    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
10843    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10844    pub software_version: [u8; 24],
10845    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
10846    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10847    pub hardware_version: [u8; 24],
10848    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
10849    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10850    pub serial_number: [u8; 32],
10851}
10852impl COMPONENT_INFORMATION_BASIC_DATA {
10853    pub const ENCODED_LEN: usize = 160usize;
10854    pub const DEFAULT: Self = Self {
10855        capabilities: MavProtocolCapability::DEFAULT,
10856        time_boot_ms: 0_u32,
10857        time_manufacture_s: 0_u32,
10858        vendor_name: [0_u8; 32usize],
10859        model_name: [0_u8; 32usize],
10860        software_version: [0_u8; 24usize],
10861        hardware_version: [0_u8; 24usize],
10862        serial_number: [0_u8; 32usize],
10863    };
10864    #[cfg(feature = "arbitrary")]
10865    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10866        use arbitrary::{Arbitrary, Unstructured};
10867        let mut buf = [0u8; 1024];
10868        rng.fill_bytes(&mut buf);
10869        let mut unstructured = Unstructured::new(&buf);
10870        Self::arbitrary(&mut unstructured).unwrap_or_default()
10871    }
10872}
10873impl Default for COMPONENT_INFORMATION_BASIC_DATA {
10874    fn default() -> Self {
10875        Self::DEFAULT.clone()
10876    }
10877}
10878impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
10879    type Message = MavMessage;
10880    const ID: u32 = 396u32;
10881    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
10882    const EXTRA_CRC: u8 = 50u8;
10883    const ENCODED_LEN: usize = 160usize;
10884    fn deser(
10885        _version: MavlinkVersion,
10886        __input: &[u8],
10887    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10888        let avail_len = __input.len();
10889        let mut payload_buf = [0; Self::ENCODED_LEN];
10890        let mut buf = if avail_len < Self::ENCODED_LEN {
10891            payload_buf[0..avail_len].copy_from_slice(__input);
10892            Bytes::new(&payload_buf)
10893        } else {
10894            Bytes::new(__input)
10895        };
10896        let mut __struct = Self::default();
10897        let tmp = buf.get_u64_le();
10898        __struct.capabilities = MavProtocolCapability::from_bits(
10899            tmp & MavProtocolCapability::all().bits(),
10900        )
10901        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
10902            flag_type: "MavProtocolCapability",
10903            value: tmp as u32,
10904        })?;
10905        __struct.time_boot_ms = buf.get_u32_le();
10906        __struct.time_manufacture_s = buf.get_u32_le();
10907        for v in &mut __struct.vendor_name {
10908            let val = buf.get_u8();
10909            *v = val;
10910        }
10911        for v in &mut __struct.model_name {
10912            let val = buf.get_u8();
10913            *v = val;
10914        }
10915        for v in &mut __struct.software_version {
10916            let val = buf.get_u8();
10917            *v = val;
10918        }
10919        for v in &mut __struct.hardware_version {
10920            let val = buf.get_u8();
10921            *v = val;
10922        }
10923        for v in &mut __struct.serial_number {
10924            let val = buf.get_u8();
10925            *v = val;
10926        }
10927        Ok(__struct)
10928    }
10929    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10930        let mut __tmp = BytesMut::new(bytes);
10931        #[allow(clippy::absurd_extreme_comparisons)]
10932        #[allow(unused_comparisons)]
10933        if __tmp.remaining() < Self::ENCODED_LEN {
10934            panic!(
10935                "buffer is too small (need {} bytes, but got {})",
10936                Self::ENCODED_LEN,
10937                __tmp.remaining(),
10938            )
10939        }
10940        __tmp.put_u64_le(self.capabilities.bits());
10941        __tmp.put_u32_le(self.time_boot_ms);
10942        __tmp.put_u32_le(self.time_manufacture_s);
10943        for val in &self.vendor_name {
10944            __tmp.put_u8(*val);
10945        }
10946        for val in &self.model_name {
10947            __tmp.put_u8(*val);
10948        }
10949        for val in &self.software_version {
10950            __tmp.put_u8(*val);
10951        }
10952        for val in &self.hardware_version {
10953            __tmp.put_u8(*val);
10954        }
10955        for val in &self.serial_number {
10956            __tmp.put_u8(*val);
10957        }
10958        if matches!(version, MavlinkVersion::V2) {
10959            let len = __tmp.len();
10960            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10961        } else {
10962            __tmp.len()
10963        }
10964    }
10965}
10966#[doc = "id: 387"]
10967#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
10968#[derive(Debug, Clone, PartialEq)]
10969#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10970#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10971pub struct CANFD_FRAME_DATA {
10972    #[doc = "Frame ID"]
10973    pub id: u32,
10974    #[doc = "System ID."]
10975    pub target_system: u8,
10976    #[doc = "Component ID."]
10977    pub target_component: u8,
10978    #[doc = "bus number"]
10979    pub bus: u8,
10980    #[doc = "Frame length"]
10981    pub len: u8,
10982    #[doc = "Frame data"]
10983    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10984    pub data: [u8; 64],
10985}
10986impl CANFD_FRAME_DATA {
10987    pub const ENCODED_LEN: usize = 72usize;
10988    pub const DEFAULT: Self = Self {
10989        id: 0_u32,
10990        target_system: 0_u8,
10991        target_component: 0_u8,
10992        bus: 0_u8,
10993        len: 0_u8,
10994        data: [0_u8; 64usize],
10995    };
10996    #[cfg(feature = "arbitrary")]
10997    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10998        use arbitrary::{Arbitrary, Unstructured};
10999        let mut buf = [0u8; 1024];
11000        rng.fill_bytes(&mut buf);
11001        let mut unstructured = Unstructured::new(&buf);
11002        Self::arbitrary(&mut unstructured).unwrap_or_default()
11003    }
11004}
11005impl Default for CANFD_FRAME_DATA {
11006    fn default() -> Self {
11007        Self::DEFAULT.clone()
11008    }
11009}
11010impl MessageData for CANFD_FRAME_DATA {
11011    type Message = MavMessage;
11012    const ID: u32 = 387u32;
11013    const NAME: &'static str = "CANFD_FRAME";
11014    const EXTRA_CRC: u8 = 4u8;
11015    const ENCODED_LEN: usize = 72usize;
11016    fn deser(
11017        _version: MavlinkVersion,
11018        __input: &[u8],
11019    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11020        let avail_len = __input.len();
11021        let mut payload_buf = [0; Self::ENCODED_LEN];
11022        let mut buf = if avail_len < Self::ENCODED_LEN {
11023            payload_buf[0..avail_len].copy_from_slice(__input);
11024            Bytes::new(&payload_buf)
11025        } else {
11026            Bytes::new(__input)
11027        };
11028        let mut __struct = Self::default();
11029        __struct.id = buf.get_u32_le();
11030        __struct.target_system = buf.get_u8();
11031        __struct.target_component = buf.get_u8();
11032        __struct.bus = buf.get_u8();
11033        __struct.len = buf.get_u8();
11034        for v in &mut __struct.data {
11035            let val = buf.get_u8();
11036            *v = val;
11037        }
11038        Ok(__struct)
11039    }
11040    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11041        let mut __tmp = BytesMut::new(bytes);
11042        #[allow(clippy::absurd_extreme_comparisons)]
11043        #[allow(unused_comparisons)]
11044        if __tmp.remaining() < Self::ENCODED_LEN {
11045            panic!(
11046                "buffer is too small (need {} bytes, but got {})",
11047                Self::ENCODED_LEN,
11048                __tmp.remaining(),
11049            )
11050        }
11051        __tmp.put_u32_le(self.id);
11052        __tmp.put_u8(self.target_system);
11053        __tmp.put_u8(self.target_component);
11054        __tmp.put_u8(self.bus);
11055        __tmp.put_u8(self.len);
11056        for val in &self.data {
11057            __tmp.put_u8(*val);
11058        }
11059        if matches!(version, MavlinkVersion::V2) {
11060            let len = __tmp.len();
11061            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11062        } else {
11063            __tmp.len()
11064        }
11065    }
11066}
11067#[doc = "id: 90"]
11068#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
11069#[derive(Debug, Clone, PartialEq)]
11070#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11071#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11072pub struct HIL_STATE_DATA {
11073    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11074    pub time_usec: u64,
11075    #[doc = "Roll angle"]
11076    pub roll: f32,
11077    #[doc = "Pitch angle"]
11078    pub pitch: f32,
11079    #[doc = "Yaw angle"]
11080    pub yaw: f32,
11081    #[doc = "Body frame roll / phi angular speed"]
11082    pub rollspeed: f32,
11083    #[doc = "Body frame pitch / theta angular speed"]
11084    pub pitchspeed: f32,
11085    #[doc = "Body frame yaw / psi angular speed"]
11086    pub yawspeed: f32,
11087    #[doc = "Latitude"]
11088    pub lat: i32,
11089    #[doc = "Longitude"]
11090    pub lon: i32,
11091    #[doc = "Altitude"]
11092    pub alt: i32,
11093    #[doc = "Ground X Speed (Latitude)"]
11094    pub vx: i16,
11095    #[doc = "Ground Y Speed (Longitude)"]
11096    pub vy: i16,
11097    #[doc = "Ground Z Speed (Altitude)"]
11098    pub vz: i16,
11099    #[doc = "X acceleration"]
11100    pub xacc: i16,
11101    #[doc = "Y acceleration"]
11102    pub yacc: i16,
11103    #[doc = "Z acceleration"]
11104    pub zacc: i16,
11105}
11106impl HIL_STATE_DATA {
11107    pub const ENCODED_LEN: usize = 56usize;
11108    pub const DEFAULT: Self = Self {
11109        time_usec: 0_u64,
11110        roll: 0.0_f32,
11111        pitch: 0.0_f32,
11112        yaw: 0.0_f32,
11113        rollspeed: 0.0_f32,
11114        pitchspeed: 0.0_f32,
11115        yawspeed: 0.0_f32,
11116        lat: 0_i32,
11117        lon: 0_i32,
11118        alt: 0_i32,
11119        vx: 0_i16,
11120        vy: 0_i16,
11121        vz: 0_i16,
11122        xacc: 0_i16,
11123        yacc: 0_i16,
11124        zacc: 0_i16,
11125    };
11126    #[cfg(feature = "arbitrary")]
11127    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11128        use arbitrary::{Arbitrary, Unstructured};
11129        let mut buf = [0u8; 1024];
11130        rng.fill_bytes(&mut buf);
11131        let mut unstructured = Unstructured::new(&buf);
11132        Self::arbitrary(&mut unstructured).unwrap_or_default()
11133    }
11134}
11135impl Default for HIL_STATE_DATA {
11136    fn default() -> Self {
11137        Self::DEFAULT.clone()
11138    }
11139}
11140impl MessageData for HIL_STATE_DATA {
11141    type Message = MavMessage;
11142    const ID: u32 = 90u32;
11143    const NAME: &'static str = "HIL_STATE";
11144    const EXTRA_CRC: u8 = 183u8;
11145    const ENCODED_LEN: usize = 56usize;
11146    fn deser(
11147        _version: MavlinkVersion,
11148        __input: &[u8],
11149    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11150        let avail_len = __input.len();
11151        let mut payload_buf = [0; Self::ENCODED_LEN];
11152        let mut buf = if avail_len < Self::ENCODED_LEN {
11153            payload_buf[0..avail_len].copy_from_slice(__input);
11154            Bytes::new(&payload_buf)
11155        } else {
11156            Bytes::new(__input)
11157        };
11158        let mut __struct = Self::default();
11159        __struct.time_usec = buf.get_u64_le();
11160        __struct.roll = buf.get_f32_le();
11161        __struct.pitch = buf.get_f32_le();
11162        __struct.yaw = buf.get_f32_le();
11163        __struct.rollspeed = buf.get_f32_le();
11164        __struct.pitchspeed = buf.get_f32_le();
11165        __struct.yawspeed = buf.get_f32_le();
11166        __struct.lat = buf.get_i32_le();
11167        __struct.lon = buf.get_i32_le();
11168        __struct.alt = buf.get_i32_le();
11169        __struct.vx = buf.get_i16_le();
11170        __struct.vy = buf.get_i16_le();
11171        __struct.vz = buf.get_i16_le();
11172        __struct.xacc = buf.get_i16_le();
11173        __struct.yacc = buf.get_i16_le();
11174        __struct.zacc = buf.get_i16_le();
11175        Ok(__struct)
11176    }
11177    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11178        let mut __tmp = BytesMut::new(bytes);
11179        #[allow(clippy::absurd_extreme_comparisons)]
11180        #[allow(unused_comparisons)]
11181        if __tmp.remaining() < Self::ENCODED_LEN {
11182            panic!(
11183                "buffer is too small (need {} bytes, but got {})",
11184                Self::ENCODED_LEN,
11185                __tmp.remaining(),
11186            )
11187        }
11188        __tmp.put_u64_le(self.time_usec);
11189        __tmp.put_f32_le(self.roll);
11190        __tmp.put_f32_le(self.pitch);
11191        __tmp.put_f32_le(self.yaw);
11192        __tmp.put_f32_le(self.rollspeed);
11193        __tmp.put_f32_le(self.pitchspeed);
11194        __tmp.put_f32_le(self.yawspeed);
11195        __tmp.put_i32_le(self.lat);
11196        __tmp.put_i32_le(self.lon);
11197        __tmp.put_i32_le(self.alt);
11198        __tmp.put_i16_le(self.vx);
11199        __tmp.put_i16_le(self.vy);
11200        __tmp.put_i16_le(self.vz);
11201        __tmp.put_i16_le(self.xacc);
11202        __tmp.put_i16_le(self.yacc);
11203        __tmp.put_i16_le(self.zacc);
11204        if matches!(version, MavlinkVersion::V2) {
11205            let len = __tmp.len();
11206            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11207        } else {
11208            __tmp.len()
11209        }
11210    }
11211}
11212#[doc = "id: 42"]
11213#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
11214#[derive(Debug, Clone, PartialEq)]
11215#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11216#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11217pub struct MISSION_CURRENT_DATA {
11218    #[doc = "Sequence"]
11219    pub seq: u16,
11220    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
11221    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11222    pub total: u16,
11223    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
11224    #[cfg_attr(feature = "serde", serde(default))]
11225    pub mission_state: MissionState,
11226    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
11227    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11228    pub mission_mode: u8,
11229    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
11230    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11231    pub mission_id: u32,
11232    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
11233    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11234    pub fence_id: u32,
11235    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
11236    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11237    pub rally_points_id: u32,
11238}
11239impl MISSION_CURRENT_DATA {
11240    pub const ENCODED_LEN: usize = 18usize;
11241    pub const DEFAULT: Self = Self {
11242        seq: 0_u16,
11243        total: 0_u16,
11244        mission_state: MissionState::DEFAULT,
11245        mission_mode: 0_u8,
11246        mission_id: 0_u32,
11247        fence_id: 0_u32,
11248        rally_points_id: 0_u32,
11249    };
11250    #[cfg(feature = "arbitrary")]
11251    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11252        use arbitrary::{Arbitrary, Unstructured};
11253        let mut buf = [0u8; 1024];
11254        rng.fill_bytes(&mut buf);
11255        let mut unstructured = Unstructured::new(&buf);
11256        Self::arbitrary(&mut unstructured).unwrap_or_default()
11257    }
11258}
11259impl Default for MISSION_CURRENT_DATA {
11260    fn default() -> Self {
11261        Self::DEFAULT.clone()
11262    }
11263}
11264impl MessageData for MISSION_CURRENT_DATA {
11265    type Message = MavMessage;
11266    const ID: u32 = 42u32;
11267    const NAME: &'static str = "MISSION_CURRENT";
11268    const EXTRA_CRC: u8 = 28u8;
11269    const ENCODED_LEN: usize = 18usize;
11270    fn deser(
11271        _version: MavlinkVersion,
11272        __input: &[u8],
11273    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11274        let avail_len = __input.len();
11275        let mut payload_buf = [0; Self::ENCODED_LEN];
11276        let mut buf = if avail_len < Self::ENCODED_LEN {
11277            payload_buf[0..avail_len].copy_from_slice(__input);
11278            Bytes::new(&payload_buf)
11279        } else {
11280            Bytes::new(__input)
11281        };
11282        let mut __struct = Self::default();
11283        __struct.seq = buf.get_u16_le();
11284        __struct.total = buf.get_u16_le();
11285        let tmp = buf.get_u8();
11286        __struct.mission_state =
11287            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11288                enum_type: "MissionState",
11289                value: tmp as u32,
11290            })?;
11291        __struct.mission_mode = buf.get_u8();
11292        __struct.mission_id = buf.get_u32_le();
11293        __struct.fence_id = buf.get_u32_le();
11294        __struct.rally_points_id = buf.get_u32_le();
11295        Ok(__struct)
11296    }
11297    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11298        let mut __tmp = BytesMut::new(bytes);
11299        #[allow(clippy::absurd_extreme_comparisons)]
11300        #[allow(unused_comparisons)]
11301        if __tmp.remaining() < Self::ENCODED_LEN {
11302            panic!(
11303                "buffer is too small (need {} bytes, but got {})",
11304                Self::ENCODED_LEN,
11305                __tmp.remaining(),
11306            )
11307        }
11308        __tmp.put_u16_le(self.seq);
11309        __tmp.put_u16_le(self.total);
11310        __tmp.put_u8(self.mission_state as u8);
11311        __tmp.put_u8(self.mission_mode);
11312        __tmp.put_u32_le(self.mission_id);
11313        __tmp.put_u32_le(self.fence_id);
11314        __tmp.put_u32_le(self.rally_points_id);
11315        if matches!(version, MavlinkVersion::V2) {
11316            let len = __tmp.len();
11317            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11318        } else {
11319            __tmp.len()
11320        }
11321    }
11322}
11323#[doc = "id: 281"]
11324#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
11325#[derive(Debug, Clone, PartialEq)]
11326#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11327#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11328pub struct GIMBAL_MANAGER_STATUS_DATA {
11329    #[doc = "Timestamp (time since system boot)."]
11330    pub time_boot_ms: u32,
11331    #[doc = "High level gimbal manager flags currently applied."]
11332    pub flags: GimbalManagerFlags,
11333    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
11334    pub gimbal_device_id: u8,
11335    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
11336    pub primary_control_sysid: u8,
11337    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
11338    pub primary_control_compid: u8,
11339    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
11340    pub secondary_control_sysid: u8,
11341    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
11342    pub secondary_control_compid: u8,
11343}
11344impl GIMBAL_MANAGER_STATUS_DATA {
11345    pub const ENCODED_LEN: usize = 13usize;
11346    pub const DEFAULT: Self = Self {
11347        time_boot_ms: 0_u32,
11348        flags: GimbalManagerFlags::DEFAULT,
11349        gimbal_device_id: 0_u8,
11350        primary_control_sysid: 0_u8,
11351        primary_control_compid: 0_u8,
11352        secondary_control_sysid: 0_u8,
11353        secondary_control_compid: 0_u8,
11354    };
11355    #[cfg(feature = "arbitrary")]
11356    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11357        use arbitrary::{Arbitrary, Unstructured};
11358        let mut buf = [0u8; 1024];
11359        rng.fill_bytes(&mut buf);
11360        let mut unstructured = Unstructured::new(&buf);
11361        Self::arbitrary(&mut unstructured).unwrap_or_default()
11362    }
11363}
11364impl Default for GIMBAL_MANAGER_STATUS_DATA {
11365    fn default() -> Self {
11366        Self::DEFAULT.clone()
11367    }
11368}
11369impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
11370    type Message = MavMessage;
11371    const ID: u32 = 281u32;
11372    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
11373    const EXTRA_CRC: u8 = 48u8;
11374    const ENCODED_LEN: usize = 13usize;
11375    fn deser(
11376        _version: MavlinkVersion,
11377        __input: &[u8],
11378    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11379        let avail_len = __input.len();
11380        let mut payload_buf = [0; Self::ENCODED_LEN];
11381        let mut buf = if avail_len < Self::ENCODED_LEN {
11382            payload_buf[0..avail_len].copy_from_slice(__input);
11383            Bytes::new(&payload_buf)
11384        } else {
11385            Bytes::new(__input)
11386        };
11387        let mut __struct = Self::default();
11388        __struct.time_boot_ms = buf.get_u32_le();
11389        let tmp = buf.get_u32_le();
11390        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
11391            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11392                flag_type: "GimbalManagerFlags",
11393                value: tmp as u32,
11394            })?;
11395        __struct.gimbal_device_id = buf.get_u8();
11396        __struct.primary_control_sysid = buf.get_u8();
11397        __struct.primary_control_compid = buf.get_u8();
11398        __struct.secondary_control_sysid = buf.get_u8();
11399        __struct.secondary_control_compid = buf.get_u8();
11400        Ok(__struct)
11401    }
11402    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11403        let mut __tmp = BytesMut::new(bytes);
11404        #[allow(clippy::absurd_extreme_comparisons)]
11405        #[allow(unused_comparisons)]
11406        if __tmp.remaining() < Self::ENCODED_LEN {
11407            panic!(
11408                "buffer is too small (need {} bytes, but got {})",
11409                Self::ENCODED_LEN,
11410                __tmp.remaining(),
11411            )
11412        }
11413        __tmp.put_u32_le(self.time_boot_ms);
11414        __tmp.put_u32_le(self.flags.bits());
11415        __tmp.put_u8(self.gimbal_device_id);
11416        __tmp.put_u8(self.primary_control_sysid);
11417        __tmp.put_u8(self.primary_control_compid);
11418        __tmp.put_u8(self.secondary_control_sysid);
11419        __tmp.put_u8(self.secondary_control_compid);
11420        if matches!(version, MavlinkVersion::V2) {
11421            let len = __tmp.len();
11422            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11423        } else {
11424            __tmp.len()
11425        }
11426    }
11427}
11428#[doc = "id: 38"]
11429#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
11430#[derive(Debug, Clone, PartialEq)]
11431#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11432#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11433pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
11434    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
11435    pub start_index: i16,
11436    #[doc = "End index, equal or greater than start index."]
11437    pub end_index: i16,
11438    #[doc = "System ID"]
11439    pub target_system: u8,
11440    #[doc = "Component ID"]
11441    pub target_component: u8,
11442    #[doc = "Mission type."]
11443    #[cfg_attr(feature = "serde", serde(default))]
11444    pub mission_type: MavMissionType,
11445}
11446impl MISSION_WRITE_PARTIAL_LIST_DATA {
11447    pub const ENCODED_LEN: usize = 7usize;
11448    pub const DEFAULT: Self = Self {
11449        start_index: 0_i16,
11450        end_index: 0_i16,
11451        target_system: 0_u8,
11452        target_component: 0_u8,
11453        mission_type: MavMissionType::DEFAULT,
11454    };
11455    #[cfg(feature = "arbitrary")]
11456    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11457        use arbitrary::{Arbitrary, Unstructured};
11458        let mut buf = [0u8; 1024];
11459        rng.fill_bytes(&mut buf);
11460        let mut unstructured = Unstructured::new(&buf);
11461        Self::arbitrary(&mut unstructured).unwrap_or_default()
11462    }
11463}
11464impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
11465    fn default() -> Self {
11466        Self::DEFAULT.clone()
11467    }
11468}
11469impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
11470    type Message = MavMessage;
11471    const ID: u32 = 38u32;
11472    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
11473    const EXTRA_CRC: u8 = 9u8;
11474    const ENCODED_LEN: usize = 7usize;
11475    fn deser(
11476        _version: MavlinkVersion,
11477        __input: &[u8],
11478    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11479        let avail_len = __input.len();
11480        let mut payload_buf = [0; Self::ENCODED_LEN];
11481        let mut buf = if avail_len < Self::ENCODED_LEN {
11482            payload_buf[0..avail_len].copy_from_slice(__input);
11483            Bytes::new(&payload_buf)
11484        } else {
11485            Bytes::new(__input)
11486        };
11487        let mut __struct = Self::default();
11488        __struct.start_index = buf.get_i16_le();
11489        __struct.end_index = buf.get_i16_le();
11490        __struct.target_system = buf.get_u8();
11491        __struct.target_component = buf.get_u8();
11492        let tmp = buf.get_u8();
11493        __struct.mission_type =
11494            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11495                enum_type: "MavMissionType",
11496                value: tmp as u32,
11497            })?;
11498        Ok(__struct)
11499    }
11500    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11501        let mut __tmp = BytesMut::new(bytes);
11502        #[allow(clippy::absurd_extreme_comparisons)]
11503        #[allow(unused_comparisons)]
11504        if __tmp.remaining() < Self::ENCODED_LEN {
11505            panic!(
11506                "buffer is too small (need {} bytes, but got {})",
11507                Self::ENCODED_LEN,
11508                __tmp.remaining(),
11509            )
11510        }
11511        __tmp.put_i16_le(self.start_index);
11512        __tmp.put_i16_le(self.end_index);
11513        __tmp.put_u8(self.target_system);
11514        __tmp.put_u8(self.target_component);
11515        __tmp.put_u8(self.mission_type as u8);
11516        if matches!(version, MavlinkVersion::V2) {
11517            let len = __tmp.len();
11518            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11519        } else {
11520            __tmp.len()
11521        }
11522    }
11523}
11524#[doc = "id: 139"]
11525#[doc = "Set the vehicle attitude and body angular rates."]
11526#[derive(Debug, Clone, PartialEq)]
11527#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11528#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11529pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
11530    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11531    pub time_usec: u64,
11532    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
11533    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11534    pub controls: [f32; 8],
11535    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
11536    pub group_mlx: u8,
11537    #[doc = "System ID"]
11538    pub target_system: u8,
11539    #[doc = "Component ID"]
11540    pub target_component: u8,
11541}
11542impl SET_ACTUATOR_CONTROL_TARGET_DATA {
11543    pub const ENCODED_LEN: usize = 43usize;
11544    pub const DEFAULT: Self = Self {
11545        time_usec: 0_u64,
11546        controls: [0.0_f32; 8usize],
11547        group_mlx: 0_u8,
11548        target_system: 0_u8,
11549        target_component: 0_u8,
11550    };
11551    #[cfg(feature = "arbitrary")]
11552    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11553        use arbitrary::{Arbitrary, Unstructured};
11554        let mut buf = [0u8; 1024];
11555        rng.fill_bytes(&mut buf);
11556        let mut unstructured = Unstructured::new(&buf);
11557        Self::arbitrary(&mut unstructured).unwrap_or_default()
11558    }
11559}
11560impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
11561    fn default() -> Self {
11562        Self::DEFAULT.clone()
11563    }
11564}
11565impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
11566    type Message = MavMessage;
11567    const ID: u32 = 139u32;
11568    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
11569    const EXTRA_CRC: u8 = 168u8;
11570    const ENCODED_LEN: usize = 43usize;
11571    fn deser(
11572        _version: MavlinkVersion,
11573        __input: &[u8],
11574    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11575        let avail_len = __input.len();
11576        let mut payload_buf = [0; Self::ENCODED_LEN];
11577        let mut buf = if avail_len < Self::ENCODED_LEN {
11578            payload_buf[0..avail_len].copy_from_slice(__input);
11579            Bytes::new(&payload_buf)
11580        } else {
11581            Bytes::new(__input)
11582        };
11583        let mut __struct = Self::default();
11584        __struct.time_usec = buf.get_u64_le();
11585        for v in &mut __struct.controls {
11586            let val = buf.get_f32_le();
11587            *v = val;
11588        }
11589        __struct.group_mlx = buf.get_u8();
11590        __struct.target_system = buf.get_u8();
11591        __struct.target_component = buf.get_u8();
11592        Ok(__struct)
11593    }
11594    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11595        let mut __tmp = BytesMut::new(bytes);
11596        #[allow(clippy::absurd_extreme_comparisons)]
11597        #[allow(unused_comparisons)]
11598        if __tmp.remaining() < Self::ENCODED_LEN {
11599            panic!(
11600                "buffer is too small (need {} bytes, but got {})",
11601                Self::ENCODED_LEN,
11602                __tmp.remaining(),
11603            )
11604        }
11605        __tmp.put_u64_le(self.time_usec);
11606        for val in &self.controls {
11607            __tmp.put_f32_le(*val);
11608        }
11609        __tmp.put_u8(self.group_mlx);
11610        __tmp.put_u8(self.target_system);
11611        __tmp.put_u8(self.target_component);
11612        if matches!(version, MavlinkVersion::V2) {
11613            let len = __tmp.len();
11614            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11615        } else {
11616            __tmp.len()
11617        }
11618    }
11619}
11620#[doc = "id: 107"]
11621#[doc = "The IMU readings in SI units in NED body frame."]
11622#[derive(Debug, Clone, PartialEq)]
11623#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11624#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11625pub struct HIL_SENSOR_DATA {
11626    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11627    pub time_usec: u64,
11628    #[doc = "X acceleration"]
11629    pub xacc: f32,
11630    #[doc = "Y acceleration"]
11631    pub yacc: f32,
11632    #[doc = "Z acceleration"]
11633    pub zacc: f32,
11634    #[doc = "Angular speed around X axis in body frame"]
11635    pub xgyro: f32,
11636    #[doc = "Angular speed around Y axis in body frame"]
11637    pub ygyro: f32,
11638    #[doc = "Angular speed around Z axis in body frame"]
11639    pub zgyro: f32,
11640    #[doc = "X Magnetic field"]
11641    pub xmag: f32,
11642    #[doc = "Y Magnetic field"]
11643    pub ymag: f32,
11644    #[doc = "Z Magnetic field"]
11645    pub zmag: f32,
11646    #[doc = "Absolute pressure"]
11647    pub abs_pressure: f32,
11648    #[doc = "Differential pressure (airspeed)"]
11649    pub diff_pressure: f32,
11650    #[doc = "Altitude calculated from pressure"]
11651    pub pressure_alt: f32,
11652    #[doc = "Temperature"]
11653    pub temperature: f32,
11654    #[doc = "Bitmap for fields that have updated since last message"]
11655    pub fields_updated: HilSensorUpdatedFlags,
11656    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
11657    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11658    pub id: u8,
11659}
11660impl HIL_SENSOR_DATA {
11661    pub const ENCODED_LEN: usize = 65usize;
11662    pub const DEFAULT: Self = Self {
11663        time_usec: 0_u64,
11664        xacc: 0.0_f32,
11665        yacc: 0.0_f32,
11666        zacc: 0.0_f32,
11667        xgyro: 0.0_f32,
11668        ygyro: 0.0_f32,
11669        zgyro: 0.0_f32,
11670        xmag: 0.0_f32,
11671        ymag: 0.0_f32,
11672        zmag: 0.0_f32,
11673        abs_pressure: 0.0_f32,
11674        diff_pressure: 0.0_f32,
11675        pressure_alt: 0.0_f32,
11676        temperature: 0.0_f32,
11677        fields_updated: HilSensorUpdatedFlags::DEFAULT,
11678        id: 0_u8,
11679    };
11680    #[cfg(feature = "arbitrary")]
11681    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11682        use arbitrary::{Arbitrary, Unstructured};
11683        let mut buf = [0u8; 1024];
11684        rng.fill_bytes(&mut buf);
11685        let mut unstructured = Unstructured::new(&buf);
11686        Self::arbitrary(&mut unstructured).unwrap_or_default()
11687    }
11688}
11689impl Default for HIL_SENSOR_DATA {
11690    fn default() -> Self {
11691        Self::DEFAULT.clone()
11692    }
11693}
11694impl MessageData for HIL_SENSOR_DATA {
11695    type Message = MavMessage;
11696    const ID: u32 = 107u32;
11697    const NAME: &'static str = "HIL_SENSOR";
11698    const EXTRA_CRC: u8 = 108u8;
11699    const ENCODED_LEN: usize = 65usize;
11700    fn deser(
11701        _version: MavlinkVersion,
11702        __input: &[u8],
11703    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11704        let avail_len = __input.len();
11705        let mut payload_buf = [0; Self::ENCODED_LEN];
11706        let mut buf = if avail_len < Self::ENCODED_LEN {
11707            payload_buf[0..avail_len].copy_from_slice(__input);
11708            Bytes::new(&payload_buf)
11709        } else {
11710            Bytes::new(__input)
11711        };
11712        let mut __struct = Self::default();
11713        __struct.time_usec = buf.get_u64_le();
11714        __struct.xacc = buf.get_f32_le();
11715        __struct.yacc = buf.get_f32_le();
11716        __struct.zacc = buf.get_f32_le();
11717        __struct.xgyro = buf.get_f32_le();
11718        __struct.ygyro = buf.get_f32_le();
11719        __struct.zgyro = buf.get_f32_le();
11720        __struct.xmag = buf.get_f32_le();
11721        __struct.ymag = buf.get_f32_le();
11722        __struct.zmag = buf.get_f32_le();
11723        __struct.abs_pressure = buf.get_f32_le();
11724        __struct.diff_pressure = buf.get_f32_le();
11725        __struct.pressure_alt = buf.get_f32_le();
11726        __struct.temperature = buf.get_f32_le();
11727        let tmp = buf.get_u32_le();
11728        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
11729            tmp & HilSensorUpdatedFlags::all().bits(),
11730        )
11731        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11732            flag_type: "HilSensorUpdatedFlags",
11733            value: tmp as u32,
11734        })?;
11735        __struct.id = buf.get_u8();
11736        Ok(__struct)
11737    }
11738    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11739        let mut __tmp = BytesMut::new(bytes);
11740        #[allow(clippy::absurd_extreme_comparisons)]
11741        #[allow(unused_comparisons)]
11742        if __tmp.remaining() < Self::ENCODED_LEN {
11743            panic!(
11744                "buffer is too small (need {} bytes, but got {})",
11745                Self::ENCODED_LEN,
11746                __tmp.remaining(),
11747            )
11748        }
11749        __tmp.put_u64_le(self.time_usec);
11750        __tmp.put_f32_le(self.xacc);
11751        __tmp.put_f32_le(self.yacc);
11752        __tmp.put_f32_le(self.zacc);
11753        __tmp.put_f32_le(self.xgyro);
11754        __tmp.put_f32_le(self.ygyro);
11755        __tmp.put_f32_le(self.zgyro);
11756        __tmp.put_f32_le(self.xmag);
11757        __tmp.put_f32_le(self.ymag);
11758        __tmp.put_f32_le(self.zmag);
11759        __tmp.put_f32_le(self.abs_pressure);
11760        __tmp.put_f32_le(self.diff_pressure);
11761        __tmp.put_f32_le(self.pressure_alt);
11762        __tmp.put_f32_le(self.temperature);
11763        __tmp.put_u32_le(self.fields_updated.bits());
11764        __tmp.put_u8(self.id);
11765        if matches!(version, MavlinkVersion::V2) {
11766            let len = __tmp.len();
11767            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11768        } else {
11769            __tmp.len()
11770        }
11771    }
11772}
11773#[doc = "id: 130"]
11774#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
11775#[derive(Debug, Clone, PartialEq)]
11776#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11777#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11778pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
11779    #[doc = "total data size (set on ACK only)."]
11780    pub size: u32,
11781    #[doc = "Width of a matrix or image."]
11782    pub width: u16,
11783    #[doc = "Height of a matrix or image."]
11784    pub height: u16,
11785    #[doc = "Number of packets being sent (set on ACK only)."]
11786    pub packets: u16,
11787    #[doc = "Type of requested/acknowledged data."]
11788    pub mavtype: MavlinkDataStreamType,
11789    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
11790    pub payload: u8,
11791    #[doc = "JPEG quality. Values: [1-100]."]
11792    pub jpg_quality: u8,
11793}
11794impl DATA_TRANSMISSION_HANDSHAKE_DATA {
11795    pub const ENCODED_LEN: usize = 13usize;
11796    pub const DEFAULT: Self = Self {
11797        size: 0_u32,
11798        width: 0_u16,
11799        height: 0_u16,
11800        packets: 0_u16,
11801        mavtype: MavlinkDataStreamType::DEFAULT,
11802        payload: 0_u8,
11803        jpg_quality: 0_u8,
11804    };
11805    #[cfg(feature = "arbitrary")]
11806    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11807        use arbitrary::{Arbitrary, Unstructured};
11808        let mut buf = [0u8; 1024];
11809        rng.fill_bytes(&mut buf);
11810        let mut unstructured = Unstructured::new(&buf);
11811        Self::arbitrary(&mut unstructured).unwrap_or_default()
11812    }
11813}
11814impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
11815    fn default() -> Self {
11816        Self::DEFAULT.clone()
11817    }
11818}
11819impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
11820    type Message = MavMessage;
11821    const ID: u32 = 130u32;
11822    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
11823    const EXTRA_CRC: u8 = 29u8;
11824    const ENCODED_LEN: usize = 13usize;
11825    fn deser(
11826        _version: MavlinkVersion,
11827        __input: &[u8],
11828    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11829        let avail_len = __input.len();
11830        let mut payload_buf = [0; Self::ENCODED_LEN];
11831        let mut buf = if avail_len < Self::ENCODED_LEN {
11832            payload_buf[0..avail_len].copy_from_slice(__input);
11833            Bytes::new(&payload_buf)
11834        } else {
11835            Bytes::new(__input)
11836        };
11837        let mut __struct = Self::default();
11838        __struct.size = buf.get_u32_le();
11839        __struct.width = buf.get_u16_le();
11840        __struct.height = buf.get_u16_le();
11841        __struct.packets = buf.get_u16_le();
11842        let tmp = buf.get_u8();
11843        __struct.mavtype =
11844            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11845                enum_type: "MavlinkDataStreamType",
11846                value: tmp as u32,
11847            })?;
11848        __struct.payload = buf.get_u8();
11849        __struct.jpg_quality = buf.get_u8();
11850        Ok(__struct)
11851    }
11852    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11853        let mut __tmp = BytesMut::new(bytes);
11854        #[allow(clippy::absurd_extreme_comparisons)]
11855        #[allow(unused_comparisons)]
11856        if __tmp.remaining() < Self::ENCODED_LEN {
11857            panic!(
11858                "buffer is too small (need {} bytes, but got {})",
11859                Self::ENCODED_LEN,
11860                __tmp.remaining(),
11861            )
11862        }
11863        __tmp.put_u32_le(self.size);
11864        __tmp.put_u16_le(self.width);
11865        __tmp.put_u16_le(self.height);
11866        __tmp.put_u16_le(self.packets);
11867        __tmp.put_u8(self.mavtype as u8);
11868        __tmp.put_u8(self.payload);
11869        __tmp.put_u8(self.jpg_quality);
11870        if matches!(version, MavlinkVersion::V2) {
11871            let len = __tmp.len();
11872            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11873        } else {
11874            __tmp.len()
11875        }
11876    }
11877}
11878#[doc = "id: 311"]
11879#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
11880#[derive(Debug, Clone, PartialEq)]
11881#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11882#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11883pub struct UAVCAN_NODE_INFO_DATA {
11884    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11885    pub time_usec: u64,
11886    #[doc = "Time since the start-up of the node."]
11887    pub uptime_sec: u32,
11888    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
11889    pub sw_vcs_commit: u32,
11890    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
11891    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11892    pub name: [u8; 80],
11893    #[doc = "Hardware major version number."]
11894    pub hw_version_major: u8,
11895    #[doc = "Hardware minor version number."]
11896    pub hw_version_minor: u8,
11897    #[doc = "Hardware unique 128-bit ID."]
11898    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11899    pub hw_unique_id: [u8; 16],
11900    #[doc = "Software major version number."]
11901    pub sw_version_major: u8,
11902    #[doc = "Software minor version number."]
11903    pub sw_version_minor: u8,
11904}
11905impl UAVCAN_NODE_INFO_DATA {
11906    pub const ENCODED_LEN: usize = 116usize;
11907    pub const DEFAULT: Self = Self {
11908        time_usec: 0_u64,
11909        uptime_sec: 0_u32,
11910        sw_vcs_commit: 0_u32,
11911        name: [0_u8; 80usize],
11912        hw_version_major: 0_u8,
11913        hw_version_minor: 0_u8,
11914        hw_unique_id: [0_u8; 16usize],
11915        sw_version_major: 0_u8,
11916        sw_version_minor: 0_u8,
11917    };
11918    #[cfg(feature = "arbitrary")]
11919    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11920        use arbitrary::{Arbitrary, Unstructured};
11921        let mut buf = [0u8; 1024];
11922        rng.fill_bytes(&mut buf);
11923        let mut unstructured = Unstructured::new(&buf);
11924        Self::arbitrary(&mut unstructured).unwrap_or_default()
11925    }
11926}
11927impl Default for UAVCAN_NODE_INFO_DATA {
11928    fn default() -> Self {
11929        Self::DEFAULT.clone()
11930    }
11931}
11932impl MessageData for UAVCAN_NODE_INFO_DATA {
11933    type Message = MavMessage;
11934    const ID: u32 = 311u32;
11935    const NAME: &'static str = "UAVCAN_NODE_INFO";
11936    const EXTRA_CRC: u8 = 95u8;
11937    const ENCODED_LEN: usize = 116usize;
11938    fn deser(
11939        _version: MavlinkVersion,
11940        __input: &[u8],
11941    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11942        let avail_len = __input.len();
11943        let mut payload_buf = [0; Self::ENCODED_LEN];
11944        let mut buf = if avail_len < Self::ENCODED_LEN {
11945            payload_buf[0..avail_len].copy_from_slice(__input);
11946            Bytes::new(&payload_buf)
11947        } else {
11948            Bytes::new(__input)
11949        };
11950        let mut __struct = Self::default();
11951        __struct.time_usec = buf.get_u64_le();
11952        __struct.uptime_sec = buf.get_u32_le();
11953        __struct.sw_vcs_commit = buf.get_u32_le();
11954        for v in &mut __struct.name {
11955            let val = buf.get_u8();
11956            *v = val;
11957        }
11958        __struct.hw_version_major = buf.get_u8();
11959        __struct.hw_version_minor = buf.get_u8();
11960        for v in &mut __struct.hw_unique_id {
11961            let val = buf.get_u8();
11962            *v = val;
11963        }
11964        __struct.sw_version_major = buf.get_u8();
11965        __struct.sw_version_minor = buf.get_u8();
11966        Ok(__struct)
11967    }
11968    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11969        let mut __tmp = BytesMut::new(bytes);
11970        #[allow(clippy::absurd_extreme_comparisons)]
11971        #[allow(unused_comparisons)]
11972        if __tmp.remaining() < Self::ENCODED_LEN {
11973            panic!(
11974                "buffer is too small (need {} bytes, but got {})",
11975                Self::ENCODED_LEN,
11976                __tmp.remaining(),
11977            )
11978        }
11979        __tmp.put_u64_le(self.time_usec);
11980        __tmp.put_u32_le(self.uptime_sec);
11981        __tmp.put_u32_le(self.sw_vcs_commit);
11982        for val in &self.name {
11983            __tmp.put_u8(*val);
11984        }
11985        __tmp.put_u8(self.hw_version_major);
11986        __tmp.put_u8(self.hw_version_minor);
11987        for val in &self.hw_unique_id {
11988            __tmp.put_u8(*val);
11989        }
11990        __tmp.put_u8(self.sw_version_major);
11991        __tmp.put_u8(self.sw_version_minor);
11992        if matches!(version, MavlinkVersion::V2) {
11993            let len = __tmp.len();
11994            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11995        } else {
11996            __tmp.len()
11997        }
11998    }
11999}
12000#[doc = "id: 9000"]
12001#[doc = "Cumulative distance traveled for each reported wheel."]
12002#[derive(Debug, Clone, PartialEq)]
12003#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12004#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12005pub struct WHEEL_DISTANCE_DATA {
12006    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
12007    pub time_usec: u64,
12008    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
12009    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12010    pub distance: [f64; 16],
12011    #[doc = "Number of wheels reported."]
12012    pub count: u8,
12013}
12014impl WHEEL_DISTANCE_DATA {
12015    pub const ENCODED_LEN: usize = 137usize;
12016    pub const DEFAULT: Self = Self {
12017        time_usec: 0_u64,
12018        distance: [0.0_f64; 16usize],
12019        count: 0_u8,
12020    };
12021    #[cfg(feature = "arbitrary")]
12022    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12023        use arbitrary::{Arbitrary, Unstructured};
12024        let mut buf = [0u8; 1024];
12025        rng.fill_bytes(&mut buf);
12026        let mut unstructured = Unstructured::new(&buf);
12027        Self::arbitrary(&mut unstructured).unwrap_or_default()
12028    }
12029}
12030impl Default for WHEEL_DISTANCE_DATA {
12031    fn default() -> Self {
12032        Self::DEFAULT.clone()
12033    }
12034}
12035impl MessageData for WHEEL_DISTANCE_DATA {
12036    type Message = MavMessage;
12037    const ID: u32 = 9000u32;
12038    const NAME: &'static str = "WHEEL_DISTANCE";
12039    const EXTRA_CRC: u8 = 113u8;
12040    const ENCODED_LEN: usize = 137usize;
12041    fn deser(
12042        _version: MavlinkVersion,
12043        __input: &[u8],
12044    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12045        let avail_len = __input.len();
12046        let mut payload_buf = [0; Self::ENCODED_LEN];
12047        let mut buf = if avail_len < Self::ENCODED_LEN {
12048            payload_buf[0..avail_len].copy_from_slice(__input);
12049            Bytes::new(&payload_buf)
12050        } else {
12051            Bytes::new(__input)
12052        };
12053        let mut __struct = Self::default();
12054        __struct.time_usec = buf.get_u64_le();
12055        for v in &mut __struct.distance {
12056            let val = buf.get_f64_le();
12057            *v = val;
12058        }
12059        __struct.count = buf.get_u8();
12060        Ok(__struct)
12061    }
12062    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12063        let mut __tmp = BytesMut::new(bytes);
12064        #[allow(clippy::absurd_extreme_comparisons)]
12065        #[allow(unused_comparisons)]
12066        if __tmp.remaining() < Self::ENCODED_LEN {
12067            panic!(
12068                "buffer is too small (need {} bytes, but got {})",
12069                Self::ENCODED_LEN,
12070                __tmp.remaining(),
12071            )
12072        }
12073        __tmp.put_u64_le(self.time_usec);
12074        for val in &self.distance {
12075            __tmp.put_f64_le(*val);
12076        }
12077        __tmp.put_u8(self.count);
12078        if matches!(version, MavlinkVersion::V2) {
12079            let len = __tmp.len();
12080            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12081        } else {
12082            __tmp.len()
12083        }
12084    }
12085}
12086#[doc = "id: 371"]
12087#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
12088#[derive(Debug, Clone, PartialEq)]
12089#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12090#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12091pub struct FUEL_STATUS_DATA {
12092    #[doc = "Capacity when full. Must be provided."]
12093    pub maximum_fuel: f32,
12094    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12095    pub consumed_fuel: f32,
12096    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12097    pub remaining_fuel: f32,
12098    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
12099    pub flow_rate: f32,
12100    #[doc = "Fuel temperature. NaN: field not provided."]
12101    pub temperature: f32,
12102    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
12103    pub fuel_type: MavFuelType,
12104    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
12105    pub id: u8,
12106    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
12107    pub percent_remaining: u8,
12108}
12109impl FUEL_STATUS_DATA {
12110    pub const ENCODED_LEN: usize = 26usize;
12111    pub const DEFAULT: Self = Self {
12112        maximum_fuel: 0.0_f32,
12113        consumed_fuel: 0.0_f32,
12114        remaining_fuel: 0.0_f32,
12115        flow_rate: 0.0_f32,
12116        temperature: 0.0_f32,
12117        fuel_type: MavFuelType::DEFAULT,
12118        id: 0_u8,
12119        percent_remaining: 0_u8,
12120    };
12121    #[cfg(feature = "arbitrary")]
12122    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12123        use arbitrary::{Arbitrary, Unstructured};
12124        let mut buf = [0u8; 1024];
12125        rng.fill_bytes(&mut buf);
12126        let mut unstructured = Unstructured::new(&buf);
12127        Self::arbitrary(&mut unstructured).unwrap_or_default()
12128    }
12129}
12130impl Default for FUEL_STATUS_DATA {
12131    fn default() -> Self {
12132        Self::DEFAULT.clone()
12133    }
12134}
12135impl MessageData for FUEL_STATUS_DATA {
12136    type Message = MavMessage;
12137    const ID: u32 = 371u32;
12138    const NAME: &'static str = "FUEL_STATUS";
12139    const EXTRA_CRC: u8 = 10u8;
12140    const ENCODED_LEN: usize = 26usize;
12141    fn deser(
12142        _version: MavlinkVersion,
12143        __input: &[u8],
12144    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12145        let avail_len = __input.len();
12146        let mut payload_buf = [0; Self::ENCODED_LEN];
12147        let mut buf = if avail_len < Self::ENCODED_LEN {
12148            payload_buf[0..avail_len].copy_from_slice(__input);
12149            Bytes::new(&payload_buf)
12150        } else {
12151            Bytes::new(__input)
12152        };
12153        let mut __struct = Self::default();
12154        __struct.maximum_fuel = buf.get_f32_le();
12155        __struct.consumed_fuel = buf.get_f32_le();
12156        __struct.remaining_fuel = buf.get_f32_le();
12157        __struct.flow_rate = buf.get_f32_le();
12158        __struct.temperature = buf.get_f32_le();
12159        let tmp = buf.get_u32_le();
12160        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
12161            ::mavlink_core::error::ParserError::InvalidEnum {
12162                enum_type: "MavFuelType",
12163                value: tmp as u32,
12164            },
12165        )?;
12166        __struct.id = buf.get_u8();
12167        __struct.percent_remaining = buf.get_u8();
12168        Ok(__struct)
12169    }
12170    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12171        let mut __tmp = BytesMut::new(bytes);
12172        #[allow(clippy::absurd_extreme_comparisons)]
12173        #[allow(unused_comparisons)]
12174        if __tmp.remaining() < Self::ENCODED_LEN {
12175            panic!(
12176                "buffer is too small (need {} bytes, but got {})",
12177                Self::ENCODED_LEN,
12178                __tmp.remaining(),
12179            )
12180        }
12181        __tmp.put_f32_le(self.maximum_fuel);
12182        __tmp.put_f32_le(self.consumed_fuel);
12183        __tmp.put_f32_le(self.remaining_fuel);
12184        __tmp.put_f32_le(self.flow_rate);
12185        __tmp.put_f32_le(self.temperature);
12186        __tmp.put_u32_le(self.fuel_type as u32);
12187        __tmp.put_u8(self.id);
12188        __tmp.put_u8(self.percent_remaining);
12189        if matches!(version, MavlinkVersion::V2) {
12190            let len = __tmp.len();
12191            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12192        } else {
12193            __tmp.len()
12194        }
12195    }
12196}
12197#[doc = "id: 12902"]
12198#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
12199#[derive(Debug, Clone, PartialEq)]
12200#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12201#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12202pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
12203    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
12204    pub timestamp: u32,
12205    #[doc = "System ID (0 for broadcast)."]
12206    pub target_system: u8,
12207    #[doc = "Component ID (0 for broadcast)."]
12208    pub target_component: u8,
12209    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
12210    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12211    pub id_or_mac: [u8; 20],
12212    #[doc = "Indicates the type of authentication."]
12213    pub authentication_type: MavOdidAuthType,
12214    #[doc = "Allowed range is 0 - 15."]
12215    pub data_page: u8,
12216    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
12217    pub last_page_index: u8,
12218    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
12219    pub length: u8,
12220    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
12221    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12222    pub authentication_data: [u8; 23],
12223}
12224impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
12225    pub const ENCODED_LEN: usize = 53usize;
12226    pub const DEFAULT: Self = Self {
12227        timestamp: 0_u32,
12228        target_system: 0_u8,
12229        target_component: 0_u8,
12230        id_or_mac: [0_u8; 20usize],
12231        authentication_type: MavOdidAuthType::DEFAULT,
12232        data_page: 0_u8,
12233        last_page_index: 0_u8,
12234        length: 0_u8,
12235        authentication_data: [0_u8; 23usize],
12236    };
12237    #[cfg(feature = "arbitrary")]
12238    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12239        use arbitrary::{Arbitrary, Unstructured};
12240        let mut buf = [0u8; 1024];
12241        rng.fill_bytes(&mut buf);
12242        let mut unstructured = Unstructured::new(&buf);
12243        Self::arbitrary(&mut unstructured).unwrap_or_default()
12244    }
12245}
12246impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
12247    fn default() -> Self {
12248        Self::DEFAULT.clone()
12249    }
12250}
12251impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
12252    type Message = MavMessage;
12253    const ID: u32 = 12902u32;
12254    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
12255    const EXTRA_CRC: u8 = 140u8;
12256    const ENCODED_LEN: usize = 53usize;
12257    fn deser(
12258        _version: MavlinkVersion,
12259        __input: &[u8],
12260    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12261        let avail_len = __input.len();
12262        let mut payload_buf = [0; Self::ENCODED_LEN];
12263        let mut buf = if avail_len < Self::ENCODED_LEN {
12264            payload_buf[0..avail_len].copy_from_slice(__input);
12265            Bytes::new(&payload_buf)
12266        } else {
12267            Bytes::new(__input)
12268        };
12269        let mut __struct = Self::default();
12270        __struct.timestamp = buf.get_u32_le();
12271        __struct.target_system = buf.get_u8();
12272        __struct.target_component = buf.get_u8();
12273        for v in &mut __struct.id_or_mac {
12274            let val = buf.get_u8();
12275            *v = val;
12276        }
12277        let tmp = buf.get_u8();
12278        __struct.authentication_type =
12279            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12280                enum_type: "MavOdidAuthType",
12281                value: tmp as u32,
12282            })?;
12283        __struct.data_page = buf.get_u8();
12284        __struct.last_page_index = buf.get_u8();
12285        __struct.length = buf.get_u8();
12286        for v in &mut __struct.authentication_data {
12287            let val = buf.get_u8();
12288            *v = val;
12289        }
12290        Ok(__struct)
12291    }
12292    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12293        let mut __tmp = BytesMut::new(bytes);
12294        #[allow(clippy::absurd_extreme_comparisons)]
12295        #[allow(unused_comparisons)]
12296        if __tmp.remaining() < Self::ENCODED_LEN {
12297            panic!(
12298                "buffer is too small (need {} bytes, but got {})",
12299                Self::ENCODED_LEN,
12300                __tmp.remaining(),
12301            )
12302        }
12303        __tmp.put_u32_le(self.timestamp);
12304        __tmp.put_u8(self.target_system);
12305        __tmp.put_u8(self.target_component);
12306        for val in &self.id_or_mac {
12307            __tmp.put_u8(*val);
12308        }
12309        __tmp.put_u8(self.authentication_type as u8);
12310        __tmp.put_u8(self.data_page);
12311        __tmp.put_u8(self.last_page_index);
12312        __tmp.put_u8(self.length);
12313        for val in &self.authentication_data {
12314            __tmp.put_u8(*val);
12315        }
12316        if matches!(version, MavlinkVersion::V2) {
12317            let len = __tmp.len();
12318            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12319        } else {
12320            __tmp.len()
12321        }
12322    }
12323}
12324#[doc = "id: 105"]
12325#[doc = "The IMU readings in SI units in NED body frame."]
12326#[derive(Debug, Clone, PartialEq)]
12327#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12328#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12329pub struct HIGHRES_IMU_DATA {
12330    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
12331    pub time_usec: u64,
12332    #[doc = "X acceleration"]
12333    pub xacc: f32,
12334    #[doc = "Y acceleration"]
12335    pub yacc: f32,
12336    #[doc = "Z acceleration"]
12337    pub zacc: f32,
12338    #[doc = "Angular speed around X axis"]
12339    pub xgyro: f32,
12340    #[doc = "Angular speed around Y axis"]
12341    pub ygyro: f32,
12342    #[doc = "Angular speed around Z axis"]
12343    pub zgyro: f32,
12344    #[doc = "X Magnetic field"]
12345    pub xmag: f32,
12346    #[doc = "Y Magnetic field"]
12347    pub ymag: f32,
12348    #[doc = "Z Magnetic field"]
12349    pub zmag: f32,
12350    #[doc = "Absolute pressure"]
12351    pub abs_pressure: f32,
12352    #[doc = "Differential pressure"]
12353    pub diff_pressure: f32,
12354    #[doc = "Altitude calculated from pressure"]
12355    pub pressure_alt: f32,
12356    #[doc = "Temperature"]
12357    pub temperature: f32,
12358    #[doc = "Bitmap for fields that have updated since last message"]
12359    pub fields_updated: HighresImuUpdatedFlags,
12360    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
12361    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12362    pub id: u8,
12363}
12364impl HIGHRES_IMU_DATA {
12365    pub const ENCODED_LEN: usize = 63usize;
12366    pub const DEFAULT: Self = Self {
12367        time_usec: 0_u64,
12368        xacc: 0.0_f32,
12369        yacc: 0.0_f32,
12370        zacc: 0.0_f32,
12371        xgyro: 0.0_f32,
12372        ygyro: 0.0_f32,
12373        zgyro: 0.0_f32,
12374        xmag: 0.0_f32,
12375        ymag: 0.0_f32,
12376        zmag: 0.0_f32,
12377        abs_pressure: 0.0_f32,
12378        diff_pressure: 0.0_f32,
12379        pressure_alt: 0.0_f32,
12380        temperature: 0.0_f32,
12381        fields_updated: HighresImuUpdatedFlags::DEFAULT,
12382        id: 0_u8,
12383    };
12384    #[cfg(feature = "arbitrary")]
12385    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12386        use arbitrary::{Arbitrary, Unstructured};
12387        let mut buf = [0u8; 1024];
12388        rng.fill_bytes(&mut buf);
12389        let mut unstructured = Unstructured::new(&buf);
12390        Self::arbitrary(&mut unstructured).unwrap_or_default()
12391    }
12392}
12393impl Default for HIGHRES_IMU_DATA {
12394    fn default() -> Self {
12395        Self::DEFAULT.clone()
12396    }
12397}
12398impl MessageData for HIGHRES_IMU_DATA {
12399    type Message = MavMessage;
12400    const ID: u32 = 105u32;
12401    const NAME: &'static str = "HIGHRES_IMU";
12402    const EXTRA_CRC: u8 = 93u8;
12403    const ENCODED_LEN: usize = 63usize;
12404    fn deser(
12405        _version: MavlinkVersion,
12406        __input: &[u8],
12407    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12408        let avail_len = __input.len();
12409        let mut payload_buf = [0; Self::ENCODED_LEN];
12410        let mut buf = if avail_len < Self::ENCODED_LEN {
12411            payload_buf[0..avail_len].copy_from_slice(__input);
12412            Bytes::new(&payload_buf)
12413        } else {
12414            Bytes::new(__input)
12415        };
12416        let mut __struct = Self::default();
12417        __struct.time_usec = buf.get_u64_le();
12418        __struct.xacc = buf.get_f32_le();
12419        __struct.yacc = buf.get_f32_le();
12420        __struct.zacc = buf.get_f32_le();
12421        __struct.xgyro = buf.get_f32_le();
12422        __struct.ygyro = buf.get_f32_le();
12423        __struct.zgyro = buf.get_f32_le();
12424        __struct.xmag = buf.get_f32_le();
12425        __struct.ymag = buf.get_f32_le();
12426        __struct.zmag = buf.get_f32_le();
12427        __struct.abs_pressure = buf.get_f32_le();
12428        __struct.diff_pressure = buf.get_f32_le();
12429        __struct.pressure_alt = buf.get_f32_le();
12430        __struct.temperature = buf.get_f32_le();
12431        let tmp = buf.get_u16_le();
12432        __struct.fields_updated = HighresImuUpdatedFlags::from_bits(
12433            tmp & HighresImuUpdatedFlags::all().bits(),
12434        )
12435        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12436            flag_type: "HighresImuUpdatedFlags",
12437            value: tmp as u32,
12438        })?;
12439        __struct.id = buf.get_u8();
12440        Ok(__struct)
12441    }
12442    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12443        let mut __tmp = BytesMut::new(bytes);
12444        #[allow(clippy::absurd_extreme_comparisons)]
12445        #[allow(unused_comparisons)]
12446        if __tmp.remaining() < Self::ENCODED_LEN {
12447            panic!(
12448                "buffer is too small (need {} bytes, but got {})",
12449                Self::ENCODED_LEN,
12450                __tmp.remaining(),
12451            )
12452        }
12453        __tmp.put_u64_le(self.time_usec);
12454        __tmp.put_f32_le(self.xacc);
12455        __tmp.put_f32_le(self.yacc);
12456        __tmp.put_f32_le(self.zacc);
12457        __tmp.put_f32_le(self.xgyro);
12458        __tmp.put_f32_le(self.ygyro);
12459        __tmp.put_f32_le(self.zgyro);
12460        __tmp.put_f32_le(self.xmag);
12461        __tmp.put_f32_le(self.ymag);
12462        __tmp.put_f32_le(self.zmag);
12463        __tmp.put_f32_le(self.abs_pressure);
12464        __tmp.put_f32_le(self.diff_pressure);
12465        __tmp.put_f32_le(self.pressure_alt);
12466        __tmp.put_f32_le(self.temperature);
12467        __tmp.put_u16_le(self.fields_updated.bits());
12468        __tmp.put_u8(self.id);
12469        if matches!(version, MavlinkVersion::V2) {
12470            let len = __tmp.len();
12471            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12472        } else {
12473            __tmp.len()
12474        }
12475    }
12476}
12477#[doc = "id: 32"]
12478#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
12479#[derive(Debug, Clone, PartialEq)]
12480#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12481#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12482pub struct LOCAL_POSITION_NED_DATA {
12483    #[doc = "Timestamp (time since system boot)."]
12484    pub time_boot_ms: u32,
12485    #[doc = "X Position"]
12486    pub x: f32,
12487    #[doc = "Y Position"]
12488    pub y: f32,
12489    #[doc = "Z Position"]
12490    pub z: f32,
12491    #[doc = "X Speed"]
12492    pub vx: f32,
12493    #[doc = "Y Speed"]
12494    pub vy: f32,
12495    #[doc = "Z Speed"]
12496    pub vz: f32,
12497}
12498impl LOCAL_POSITION_NED_DATA {
12499    pub const ENCODED_LEN: usize = 28usize;
12500    pub const DEFAULT: Self = Self {
12501        time_boot_ms: 0_u32,
12502        x: 0.0_f32,
12503        y: 0.0_f32,
12504        z: 0.0_f32,
12505        vx: 0.0_f32,
12506        vy: 0.0_f32,
12507        vz: 0.0_f32,
12508    };
12509    #[cfg(feature = "arbitrary")]
12510    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12511        use arbitrary::{Arbitrary, Unstructured};
12512        let mut buf = [0u8; 1024];
12513        rng.fill_bytes(&mut buf);
12514        let mut unstructured = Unstructured::new(&buf);
12515        Self::arbitrary(&mut unstructured).unwrap_or_default()
12516    }
12517}
12518impl Default for LOCAL_POSITION_NED_DATA {
12519    fn default() -> Self {
12520        Self::DEFAULT.clone()
12521    }
12522}
12523impl MessageData for LOCAL_POSITION_NED_DATA {
12524    type Message = MavMessage;
12525    const ID: u32 = 32u32;
12526    const NAME: &'static str = "LOCAL_POSITION_NED";
12527    const EXTRA_CRC: u8 = 185u8;
12528    const ENCODED_LEN: usize = 28usize;
12529    fn deser(
12530        _version: MavlinkVersion,
12531        __input: &[u8],
12532    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12533        let avail_len = __input.len();
12534        let mut payload_buf = [0; Self::ENCODED_LEN];
12535        let mut buf = if avail_len < Self::ENCODED_LEN {
12536            payload_buf[0..avail_len].copy_from_slice(__input);
12537            Bytes::new(&payload_buf)
12538        } else {
12539            Bytes::new(__input)
12540        };
12541        let mut __struct = Self::default();
12542        __struct.time_boot_ms = buf.get_u32_le();
12543        __struct.x = buf.get_f32_le();
12544        __struct.y = buf.get_f32_le();
12545        __struct.z = buf.get_f32_le();
12546        __struct.vx = buf.get_f32_le();
12547        __struct.vy = buf.get_f32_le();
12548        __struct.vz = buf.get_f32_le();
12549        Ok(__struct)
12550    }
12551    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12552        let mut __tmp = BytesMut::new(bytes);
12553        #[allow(clippy::absurd_extreme_comparisons)]
12554        #[allow(unused_comparisons)]
12555        if __tmp.remaining() < Self::ENCODED_LEN {
12556            panic!(
12557                "buffer is too small (need {} bytes, but got {})",
12558                Self::ENCODED_LEN,
12559                __tmp.remaining(),
12560            )
12561        }
12562        __tmp.put_u32_le(self.time_boot_ms);
12563        __tmp.put_f32_le(self.x);
12564        __tmp.put_f32_le(self.y);
12565        __tmp.put_f32_le(self.z);
12566        __tmp.put_f32_le(self.vx);
12567        __tmp.put_f32_le(self.vy);
12568        __tmp.put_f32_le(self.vz);
12569        if matches!(version, MavlinkVersion::V2) {
12570            let len = __tmp.len();
12571            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12572        } else {
12573            __tmp.len()
12574        }
12575    }
12576}
12577#[doc = "id: 8"]
12578#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
12579#[derive(Debug, Clone, PartialEq)]
12580#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12581#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12582pub struct LINK_NODE_STATUS_DATA {
12583    #[doc = "Timestamp (time since system boot)."]
12584    pub timestamp: u64,
12585    #[doc = "Transmit rate"]
12586    pub tx_rate: u32,
12587    #[doc = "Receive rate"]
12588    pub rx_rate: u32,
12589    #[doc = "Messages sent"]
12590    pub messages_sent: u32,
12591    #[doc = "Messages received (estimated from counting seq)"]
12592    pub messages_received: u32,
12593    #[doc = "Messages lost (estimated from counting seq)"]
12594    pub messages_lost: u32,
12595    #[doc = "Number of bytes that could not be parsed correctly."]
12596    pub rx_parse_err: u16,
12597    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
12598    pub tx_overflows: u16,
12599    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
12600    pub rx_overflows: u16,
12601    #[doc = "Remaining free transmit buffer space"]
12602    pub tx_buf: u8,
12603    #[doc = "Remaining free receive buffer space"]
12604    pub rx_buf: u8,
12605}
12606impl LINK_NODE_STATUS_DATA {
12607    pub const ENCODED_LEN: usize = 36usize;
12608    pub const DEFAULT: Self = Self {
12609        timestamp: 0_u64,
12610        tx_rate: 0_u32,
12611        rx_rate: 0_u32,
12612        messages_sent: 0_u32,
12613        messages_received: 0_u32,
12614        messages_lost: 0_u32,
12615        rx_parse_err: 0_u16,
12616        tx_overflows: 0_u16,
12617        rx_overflows: 0_u16,
12618        tx_buf: 0_u8,
12619        rx_buf: 0_u8,
12620    };
12621    #[cfg(feature = "arbitrary")]
12622    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12623        use arbitrary::{Arbitrary, Unstructured};
12624        let mut buf = [0u8; 1024];
12625        rng.fill_bytes(&mut buf);
12626        let mut unstructured = Unstructured::new(&buf);
12627        Self::arbitrary(&mut unstructured).unwrap_or_default()
12628    }
12629}
12630impl Default for LINK_NODE_STATUS_DATA {
12631    fn default() -> Self {
12632        Self::DEFAULT.clone()
12633    }
12634}
12635impl MessageData for LINK_NODE_STATUS_DATA {
12636    type Message = MavMessage;
12637    const ID: u32 = 8u32;
12638    const NAME: &'static str = "LINK_NODE_STATUS";
12639    const EXTRA_CRC: u8 = 117u8;
12640    const ENCODED_LEN: usize = 36usize;
12641    fn deser(
12642        _version: MavlinkVersion,
12643        __input: &[u8],
12644    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12645        let avail_len = __input.len();
12646        let mut payload_buf = [0; Self::ENCODED_LEN];
12647        let mut buf = if avail_len < Self::ENCODED_LEN {
12648            payload_buf[0..avail_len].copy_from_slice(__input);
12649            Bytes::new(&payload_buf)
12650        } else {
12651            Bytes::new(__input)
12652        };
12653        let mut __struct = Self::default();
12654        __struct.timestamp = buf.get_u64_le();
12655        __struct.tx_rate = buf.get_u32_le();
12656        __struct.rx_rate = buf.get_u32_le();
12657        __struct.messages_sent = buf.get_u32_le();
12658        __struct.messages_received = buf.get_u32_le();
12659        __struct.messages_lost = buf.get_u32_le();
12660        __struct.rx_parse_err = buf.get_u16_le();
12661        __struct.tx_overflows = buf.get_u16_le();
12662        __struct.rx_overflows = buf.get_u16_le();
12663        __struct.tx_buf = buf.get_u8();
12664        __struct.rx_buf = buf.get_u8();
12665        Ok(__struct)
12666    }
12667    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12668        let mut __tmp = BytesMut::new(bytes);
12669        #[allow(clippy::absurd_extreme_comparisons)]
12670        #[allow(unused_comparisons)]
12671        if __tmp.remaining() < Self::ENCODED_LEN {
12672            panic!(
12673                "buffer is too small (need {} bytes, but got {})",
12674                Self::ENCODED_LEN,
12675                __tmp.remaining(),
12676            )
12677        }
12678        __tmp.put_u64_le(self.timestamp);
12679        __tmp.put_u32_le(self.tx_rate);
12680        __tmp.put_u32_le(self.rx_rate);
12681        __tmp.put_u32_le(self.messages_sent);
12682        __tmp.put_u32_le(self.messages_received);
12683        __tmp.put_u32_le(self.messages_lost);
12684        __tmp.put_u16_le(self.rx_parse_err);
12685        __tmp.put_u16_le(self.tx_overflows);
12686        __tmp.put_u16_le(self.rx_overflows);
12687        __tmp.put_u8(self.tx_buf);
12688        __tmp.put_u8(self.rx_buf);
12689        if matches!(version, MavlinkVersion::V2) {
12690            let len = __tmp.len();
12691            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12692        } else {
12693            __tmp.len()
12694        }
12695    }
12696}
12697#[doc = "id: 251"]
12698#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
12699#[derive(Debug, Clone, PartialEq)]
12700#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12701#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12702pub struct NAMED_VALUE_FLOAT_DATA {
12703    #[doc = "Timestamp (time since system boot)."]
12704    pub time_boot_ms: u32,
12705    #[doc = "Floating point value"]
12706    pub value: f32,
12707    #[doc = "Name of the debug variable"]
12708    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12709    pub name: [u8; 10],
12710}
12711impl NAMED_VALUE_FLOAT_DATA {
12712    pub const ENCODED_LEN: usize = 18usize;
12713    pub const DEFAULT: Self = Self {
12714        time_boot_ms: 0_u32,
12715        value: 0.0_f32,
12716        name: [0_u8; 10usize],
12717    };
12718    #[cfg(feature = "arbitrary")]
12719    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12720        use arbitrary::{Arbitrary, Unstructured};
12721        let mut buf = [0u8; 1024];
12722        rng.fill_bytes(&mut buf);
12723        let mut unstructured = Unstructured::new(&buf);
12724        Self::arbitrary(&mut unstructured).unwrap_or_default()
12725    }
12726}
12727impl Default for NAMED_VALUE_FLOAT_DATA {
12728    fn default() -> Self {
12729        Self::DEFAULT.clone()
12730    }
12731}
12732impl MessageData for NAMED_VALUE_FLOAT_DATA {
12733    type Message = MavMessage;
12734    const ID: u32 = 251u32;
12735    const NAME: &'static str = "NAMED_VALUE_FLOAT";
12736    const EXTRA_CRC: u8 = 170u8;
12737    const ENCODED_LEN: usize = 18usize;
12738    fn deser(
12739        _version: MavlinkVersion,
12740        __input: &[u8],
12741    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12742        let avail_len = __input.len();
12743        let mut payload_buf = [0; Self::ENCODED_LEN];
12744        let mut buf = if avail_len < Self::ENCODED_LEN {
12745            payload_buf[0..avail_len].copy_from_slice(__input);
12746            Bytes::new(&payload_buf)
12747        } else {
12748            Bytes::new(__input)
12749        };
12750        let mut __struct = Self::default();
12751        __struct.time_boot_ms = buf.get_u32_le();
12752        __struct.value = buf.get_f32_le();
12753        for v in &mut __struct.name {
12754            let val = buf.get_u8();
12755            *v = val;
12756        }
12757        Ok(__struct)
12758    }
12759    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12760        let mut __tmp = BytesMut::new(bytes);
12761        #[allow(clippy::absurd_extreme_comparisons)]
12762        #[allow(unused_comparisons)]
12763        if __tmp.remaining() < Self::ENCODED_LEN {
12764            panic!(
12765                "buffer is too small (need {} bytes, but got {})",
12766                Self::ENCODED_LEN,
12767                __tmp.remaining(),
12768            )
12769        }
12770        __tmp.put_u32_le(self.time_boot_ms);
12771        __tmp.put_f32_le(self.value);
12772        for val in &self.name {
12773            __tmp.put_u8(*val);
12774        }
12775        if matches!(version, MavlinkVersion::V2) {
12776            let len = __tmp.len();
12777            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12778        } else {
12779            __tmp.len()
12780        }
12781    }
12782}
12783#[doc = "id: 241"]
12784#[doc = "Vibration levels and accelerometer clipping."]
12785#[derive(Debug, Clone, PartialEq)]
12786#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12787#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12788pub struct VIBRATION_DATA {
12789    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
12790    pub time_usec: u64,
12791    #[doc = "Vibration levels on X-axis"]
12792    pub vibration_x: f32,
12793    #[doc = "Vibration levels on Y-axis"]
12794    pub vibration_y: f32,
12795    #[doc = "Vibration levels on Z-axis"]
12796    pub vibration_z: f32,
12797    #[doc = "first accelerometer clipping count"]
12798    pub clipping_0: u32,
12799    #[doc = "second accelerometer clipping count"]
12800    pub clipping_1: u32,
12801    #[doc = "third accelerometer clipping count"]
12802    pub clipping_2: u32,
12803}
12804impl VIBRATION_DATA {
12805    pub const ENCODED_LEN: usize = 32usize;
12806    pub const DEFAULT: Self = Self {
12807        time_usec: 0_u64,
12808        vibration_x: 0.0_f32,
12809        vibration_y: 0.0_f32,
12810        vibration_z: 0.0_f32,
12811        clipping_0: 0_u32,
12812        clipping_1: 0_u32,
12813        clipping_2: 0_u32,
12814    };
12815    #[cfg(feature = "arbitrary")]
12816    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12817        use arbitrary::{Arbitrary, Unstructured};
12818        let mut buf = [0u8; 1024];
12819        rng.fill_bytes(&mut buf);
12820        let mut unstructured = Unstructured::new(&buf);
12821        Self::arbitrary(&mut unstructured).unwrap_or_default()
12822    }
12823}
12824impl Default for VIBRATION_DATA {
12825    fn default() -> Self {
12826        Self::DEFAULT.clone()
12827    }
12828}
12829impl MessageData for VIBRATION_DATA {
12830    type Message = MavMessage;
12831    const ID: u32 = 241u32;
12832    const NAME: &'static str = "VIBRATION";
12833    const EXTRA_CRC: u8 = 90u8;
12834    const ENCODED_LEN: usize = 32usize;
12835    fn deser(
12836        _version: MavlinkVersion,
12837        __input: &[u8],
12838    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12839        let avail_len = __input.len();
12840        let mut payload_buf = [0; Self::ENCODED_LEN];
12841        let mut buf = if avail_len < Self::ENCODED_LEN {
12842            payload_buf[0..avail_len].copy_from_slice(__input);
12843            Bytes::new(&payload_buf)
12844        } else {
12845            Bytes::new(__input)
12846        };
12847        let mut __struct = Self::default();
12848        __struct.time_usec = buf.get_u64_le();
12849        __struct.vibration_x = buf.get_f32_le();
12850        __struct.vibration_y = buf.get_f32_le();
12851        __struct.vibration_z = buf.get_f32_le();
12852        __struct.clipping_0 = buf.get_u32_le();
12853        __struct.clipping_1 = buf.get_u32_le();
12854        __struct.clipping_2 = buf.get_u32_le();
12855        Ok(__struct)
12856    }
12857    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12858        let mut __tmp = BytesMut::new(bytes);
12859        #[allow(clippy::absurd_extreme_comparisons)]
12860        #[allow(unused_comparisons)]
12861        if __tmp.remaining() < Self::ENCODED_LEN {
12862            panic!(
12863                "buffer is too small (need {} bytes, but got {})",
12864                Self::ENCODED_LEN,
12865                __tmp.remaining(),
12866            )
12867        }
12868        __tmp.put_u64_le(self.time_usec);
12869        __tmp.put_f32_le(self.vibration_x);
12870        __tmp.put_f32_le(self.vibration_y);
12871        __tmp.put_f32_le(self.vibration_z);
12872        __tmp.put_u32_le(self.clipping_0);
12873        __tmp.put_u32_le(self.clipping_1);
12874        __tmp.put_u32_le(self.clipping_2);
12875        if matches!(version, MavlinkVersion::V2) {
12876            let len = __tmp.len();
12877            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12878        } else {
12879            __tmp.len()
12880        }
12881    }
12882}
12883#[doc = "id: 73"]
12884#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
12885#[derive(Debug, Clone, PartialEq)]
12886#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12887#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12888pub struct MISSION_ITEM_INT_DATA {
12889    #[doc = "PARAM1, see MAV_CMD enum"]
12890    pub param1: f32,
12891    #[doc = "PARAM2, see MAV_CMD enum"]
12892    pub param2: f32,
12893    #[doc = "PARAM3, see MAV_CMD enum"]
12894    pub param3: f32,
12895    #[doc = "PARAM4, see MAV_CMD enum"]
12896    pub param4: f32,
12897    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
12898    pub x: i32,
12899    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
12900    pub y: i32,
12901    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
12902    pub z: f32,
12903    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
12904    pub seq: u16,
12905    #[doc = "The scheduled action for the waypoint."]
12906    pub command: MavCmd,
12907    #[doc = "System ID"]
12908    pub target_system: u8,
12909    #[doc = "Component ID"]
12910    pub target_component: u8,
12911    #[doc = "The coordinate system of the waypoint."]
12912    pub frame: MavFrame,
12913    #[doc = "false:0, true:1"]
12914    pub current: u8,
12915    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
12916    pub autocontinue: u8,
12917    #[doc = "Mission type."]
12918    #[cfg_attr(feature = "serde", serde(default))]
12919    pub mission_type: MavMissionType,
12920}
12921impl MISSION_ITEM_INT_DATA {
12922    pub const ENCODED_LEN: usize = 38usize;
12923    pub const DEFAULT: Self = Self {
12924        param1: 0.0_f32,
12925        param2: 0.0_f32,
12926        param3: 0.0_f32,
12927        param4: 0.0_f32,
12928        x: 0_i32,
12929        y: 0_i32,
12930        z: 0.0_f32,
12931        seq: 0_u16,
12932        command: MavCmd::DEFAULT,
12933        target_system: 0_u8,
12934        target_component: 0_u8,
12935        frame: MavFrame::DEFAULT,
12936        current: 0_u8,
12937        autocontinue: 0_u8,
12938        mission_type: MavMissionType::DEFAULT,
12939    };
12940    #[cfg(feature = "arbitrary")]
12941    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12942        use arbitrary::{Arbitrary, Unstructured};
12943        let mut buf = [0u8; 1024];
12944        rng.fill_bytes(&mut buf);
12945        let mut unstructured = Unstructured::new(&buf);
12946        Self::arbitrary(&mut unstructured).unwrap_or_default()
12947    }
12948}
12949impl Default for MISSION_ITEM_INT_DATA {
12950    fn default() -> Self {
12951        Self::DEFAULT.clone()
12952    }
12953}
12954impl MessageData for MISSION_ITEM_INT_DATA {
12955    type Message = MavMessage;
12956    const ID: u32 = 73u32;
12957    const NAME: &'static str = "MISSION_ITEM_INT";
12958    const EXTRA_CRC: u8 = 38u8;
12959    const ENCODED_LEN: usize = 38usize;
12960    fn deser(
12961        _version: MavlinkVersion,
12962        __input: &[u8],
12963    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12964        let avail_len = __input.len();
12965        let mut payload_buf = [0; Self::ENCODED_LEN];
12966        let mut buf = if avail_len < Self::ENCODED_LEN {
12967            payload_buf[0..avail_len].copy_from_slice(__input);
12968            Bytes::new(&payload_buf)
12969        } else {
12970            Bytes::new(__input)
12971        };
12972        let mut __struct = Self::default();
12973        __struct.param1 = buf.get_f32_le();
12974        __struct.param2 = buf.get_f32_le();
12975        __struct.param3 = buf.get_f32_le();
12976        __struct.param4 = buf.get_f32_le();
12977        __struct.x = buf.get_i32_le();
12978        __struct.y = buf.get_i32_le();
12979        __struct.z = buf.get_f32_le();
12980        __struct.seq = buf.get_u16_le();
12981        let tmp = buf.get_u16_le();
12982        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
12983            ::mavlink_core::error::ParserError::InvalidEnum {
12984                enum_type: "MavCmd",
12985                value: tmp as u32,
12986            },
12987        )?;
12988        __struct.target_system = buf.get_u8();
12989        __struct.target_component = buf.get_u8();
12990        let tmp = buf.get_u8();
12991        __struct.frame =
12992            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12993                enum_type: "MavFrame",
12994                value: tmp as u32,
12995            })?;
12996        __struct.current = buf.get_u8();
12997        __struct.autocontinue = buf.get_u8();
12998        let tmp = buf.get_u8();
12999        __struct.mission_type =
13000            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13001                enum_type: "MavMissionType",
13002                value: tmp as u32,
13003            })?;
13004        Ok(__struct)
13005    }
13006    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13007        let mut __tmp = BytesMut::new(bytes);
13008        #[allow(clippy::absurd_extreme_comparisons)]
13009        #[allow(unused_comparisons)]
13010        if __tmp.remaining() < Self::ENCODED_LEN {
13011            panic!(
13012                "buffer is too small (need {} bytes, but got {})",
13013                Self::ENCODED_LEN,
13014                __tmp.remaining(),
13015            )
13016        }
13017        __tmp.put_f32_le(self.param1);
13018        __tmp.put_f32_le(self.param2);
13019        __tmp.put_f32_le(self.param3);
13020        __tmp.put_f32_le(self.param4);
13021        __tmp.put_i32_le(self.x);
13022        __tmp.put_i32_le(self.y);
13023        __tmp.put_f32_le(self.z);
13024        __tmp.put_u16_le(self.seq);
13025        __tmp.put_u16_le(self.command as u16);
13026        __tmp.put_u8(self.target_system);
13027        __tmp.put_u8(self.target_component);
13028        __tmp.put_u8(self.frame as u8);
13029        __tmp.put_u8(self.current);
13030        __tmp.put_u8(self.autocontinue);
13031        __tmp.put_u8(self.mission_type as u8);
13032        if matches!(version, MavlinkVersion::V2) {
13033            let len = __tmp.len();
13034            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13035        } else {
13036            __tmp.len()
13037        }
13038    }
13039}
13040#[doc = "id: 149"]
13041#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
13042#[derive(Debug, Clone, PartialEq)]
13043#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13044#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13045pub struct LANDING_TARGET_DATA {
13046    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13047    pub time_usec: u64,
13048    #[doc = "X-axis angular offset of the target from the center of the image"]
13049    pub angle_x: f32,
13050    #[doc = "Y-axis angular offset of the target from the center of the image"]
13051    pub angle_y: f32,
13052    #[doc = "Distance to the target from the vehicle"]
13053    pub distance: f32,
13054    #[doc = "Size of target along x-axis"]
13055    pub size_x: f32,
13056    #[doc = "Size of target along y-axis"]
13057    pub size_y: f32,
13058    #[doc = "The ID of the target if multiple targets are present"]
13059    pub target_num: u8,
13060    #[doc = "Coordinate frame used for following fields."]
13061    pub frame: MavFrame,
13062    #[doc = "X Position of the landing target in MAV_FRAME"]
13063    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13064    pub x: f32,
13065    #[doc = "Y Position of the landing target in MAV_FRAME"]
13066    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13067    pub y: f32,
13068    #[doc = "Z Position of the landing target in MAV_FRAME"]
13069    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13070    pub z: f32,
13071    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
13072    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13073    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13074    pub q: [f32; 4],
13075    #[doc = "Type of landing target"]
13076    #[cfg_attr(feature = "serde", serde(default))]
13077    pub mavtype: LandingTargetType,
13078    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
13079    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13080    pub position_valid: u8,
13081}
13082impl LANDING_TARGET_DATA {
13083    pub const ENCODED_LEN: usize = 60usize;
13084    pub const DEFAULT: Self = Self {
13085        time_usec: 0_u64,
13086        angle_x: 0.0_f32,
13087        angle_y: 0.0_f32,
13088        distance: 0.0_f32,
13089        size_x: 0.0_f32,
13090        size_y: 0.0_f32,
13091        target_num: 0_u8,
13092        frame: MavFrame::DEFAULT,
13093        x: 0.0_f32,
13094        y: 0.0_f32,
13095        z: 0.0_f32,
13096        q: [0.0_f32; 4usize],
13097        mavtype: LandingTargetType::DEFAULT,
13098        position_valid: 0_u8,
13099    };
13100    #[cfg(feature = "arbitrary")]
13101    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13102        use arbitrary::{Arbitrary, Unstructured};
13103        let mut buf = [0u8; 1024];
13104        rng.fill_bytes(&mut buf);
13105        let mut unstructured = Unstructured::new(&buf);
13106        Self::arbitrary(&mut unstructured).unwrap_or_default()
13107    }
13108}
13109impl Default for LANDING_TARGET_DATA {
13110    fn default() -> Self {
13111        Self::DEFAULT.clone()
13112    }
13113}
13114impl MessageData for LANDING_TARGET_DATA {
13115    type Message = MavMessage;
13116    const ID: u32 = 149u32;
13117    const NAME: &'static str = "LANDING_TARGET";
13118    const EXTRA_CRC: u8 = 200u8;
13119    const ENCODED_LEN: usize = 60usize;
13120    fn deser(
13121        _version: MavlinkVersion,
13122        __input: &[u8],
13123    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13124        let avail_len = __input.len();
13125        let mut payload_buf = [0; Self::ENCODED_LEN];
13126        let mut buf = if avail_len < Self::ENCODED_LEN {
13127            payload_buf[0..avail_len].copy_from_slice(__input);
13128            Bytes::new(&payload_buf)
13129        } else {
13130            Bytes::new(__input)
13131        };
13132        let mut __struct = Self::default();
13133        __struct.time_usec = buf.get_u64_le();
13134        __struct.angle_x = buf.get_f32_le();
13135        __struct.angle_y = buf.get_f32_le();
13136        __struct.distance = buf.get_f32_le();
13137        __struct.size_x = buf.get_f32_le();
13138        __struct.size_y = buf.get_f32_le();
13139        __struct.target_num = buf.get_u8();
13140        let tmp = buf.get_u8();
13141        __struct.frame =
13142            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13143                enum_type: "MavFrame",
13144                value: tmp as u32,
13145            })?;
13146        __struct.x = buf.get_f32_le();
13147        __struct.y = buf.get_f32_le();
13148        __struct.z = buf.get_f32_le();
13149        for v in &mut __struct.q {
13150            let val = buf.get_f32_le();
13151            *v = val;
13152        }
13153        let tmp = buf.get_u8();
13154        __struct.mavtype =
13155            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13156                enum_type: "LandingTargetType",
13157                value: tmp as u32,
13158            })?;
13159        __struct.position_valid = buf.get_u8();
13160        Ok(__struct)
13161    }
13162    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13163        let mut __tmp = BytesMut::new(bytes);
13164        #[allow(clippy::absurd_extreme_comparisons)]
13165        #[allow(unused_comparisons)]
13166        if __tmp.remaining() < Self::ENCODED_LEN {
13167            panic!(
13168                "buffer is too small (need {} bytes, but got {})",
13169                Self::ENCODED_LEN,
13170                __tmp.remaining(),
13171            )
13172        }
13173        __tmp.put_u64_le(self.time_usec);
13174        __tmp.put_f32_le(self.angle_x);
13175        __tmp.put_f32_le(self.angle_y);
13176        __tmp.put_f32_le(self.distance);
13177        __tmp.put_f32_le(self.size_x);
13178        __tmp.put_f32_le(self.size_y);
13179        __tmp.put_u8(self.target_num);
13180        __tmp.put_u8(self.frame as u8);
13181        __tmp.put_f32_le(self.x);
13182        __tmp.put_f32_le(self.y);
13183        __tmp.put_f32_le(self.z);
13184        for val in &self.q {
13185            __tmp.put_f32_le(*val);
13186        }
13187        __tmp.put_u8(self.mavtype as u8);
13188        __tmp.put_u8(self.position_valid);
13189        if matches!(version, MavlinkVersion::V2) {
13190            let len = __tmp.len();
13191            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13192        } else {
13193            __tmp.len()
13194        }
13195    }
13196}
13197#[doc = "id: 390"]
13198#[doc = "Hardware status sent by an onboard computer."]
13199#[derive(Debug, Clone, PartialEq)]
13200#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13201#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13202pub struct ONBOARD_COMPUTER_STATUS_DATA {
13203    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13204    pub time_usec: u64,
13205    #[doc = "Time since system boot."]
13206    pub uptime: u32,
13207    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
13208    pub ram_usage: u32,
13209    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
13210    pub ram_total: u32,
13211    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
13212    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13213    pub storage_type: [u32; 4],
13214    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
13215    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13216    pub storage_usage: [u32; 4],
13217    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
13218    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13219    pub storage_total: [u32; 4],
13220    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
13221    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13222    pub link_type: [u32; 6],
13223    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
13224    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13225    pub link_tx_rate: [u32; 6],
13226    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
13227    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13228    pub link_rx_rate: [u32; 6],
13229    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
13230    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13231    pub link_tx_max: [u32; 6],
13232    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
13233    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13234    pub link_rx_max: [u32; 6],
13235    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
13236    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13237    pub fan_speed: [i16; 4],
13238    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
13239    pub mavtype: u8,
13240    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
13241    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13242    pub cpu_cores: [u8; 8],
13243    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
13244    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13245    pub cpu_combined: [u8; 10],
13246    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
13247    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13248    pub gpu_cores: [u8; 4],
13249    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
13250    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13251    pub gpu_combined: [u8; 10],
13252    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
13253    pub temperature_board: i8,
13254    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
13255    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13256    pub temperature_core: [i8; 8],
13257}
13258impl ONBOARD_COMPUTER_STATUS_DATA {
13259    pub const ENCODED_LEN: usize = 238usize;
13260    pub const DEFAULT: Self = Self {
13261        time_usec: 0_u64,
13262        uptime: 0_u32,
13263        ram_usage: 0_u32,
13264        ram_total: 0_u32,
13265        storage_type: [0_u32; 4usize],
13266        storage_usage: [0_u32; 4usize],
13267        storage_total: [0_u32; 4usize],
13268        link_type: [0_u32; 6usize],
13269        link_tx_rate: [0_u32; 6usize],
13270        link_rx_rate: [0_u32; 6usize],
13271        link_tx_max: [0_u32; 6usize],
13272        link_rx_max: [0_u32; 6usize],
13273        fan_speed: [0_i16; 4usize],
13274        mavtype: 0_u8,
13275        cpu_cores: [0_u8; 8usize],
13276        cpu_combined: [0_u8; 10usize],
13277        gpu_cores: [0_u8; 4usize],
13278        gpu_combined: [0_u8; 10usize],
13279        temperature_board: 0_i8,
13280        temperature_core: [0_i8; 8usize],
13281    };
13282    #[cfg(feature = "arbitrary")]
13283    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13284        use arbitrary::{Arbitrary, Unstructured};
13285        let mut buf = [0u8; 1024];
13286        rng.fill_bytes(&mut buf);
13287        let mut unstructured = Unstructured::new(&buf);
13288        Self::arbitrary(&mut unstructured).unwrap_or_default()
13289    }
13290}
13291impl Default for ONBOARD_COMPUTER_STATUS_DATA {
13292    fn default() -> Self {
13293        Self::DEFAULT.clone()
13294    }
13295}
13296impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
13297    type Message = MavMessage;
13298    const ID: u32 = 390u32;
13299    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
13300    const EXTRA_CRC: u8 = 156u8;
13301    const ENCODED_LEN: usize = 238usize;
13302    fn deser(
13303        _version: MavlinkVersion,
13304        __input: &[u8],
13305    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13306        let avail_len = __input.len();
13307        let mut payload_buf = [0; Self::ENCODED_LEN];
13308        let mut buf = if avail_len < Self::ENCODED_LEN {
13309            payload_buf[0..avail_len].copy_from_slice(__input);
13310            Bytes::new(&payload_buf)
13311        } else {
13312            Bytes::new(__input)
13313        };
13314        let mut __struct = Self::default();
13315        __struct.time_usec = buf.get_u64_le();
13316        __struct.uptime = buf.get_u32_le();
13317        __struct.ram_usage = buf.get_u32_le();
13318        __struct.ram_total = buf.get_u32_le();
13319        for v in &mut __struct.storage_type {
13320            let val = buf.get_u32_le();
13321            *v = val;
13322        }
13323        for v in &mut __struct.storage_usage {
13324            let val = buf.get_u32_le();
13325            *v = val;
13326        }
13327        for v in &mut __struct.storage_total {
13328            let val = buf.get_u32_le();
13329            *v = val;
13330        }
13331        for v in &mut __struct.link_type {
13332            let val = buf.get_u32_le();
13333            *v = val;
13334        }
13335        for v in &mut __struct.link_tx_rate {
13336            let val = buf.get_u32_le();
13337            *v = val;
13338        }
13339        for v in &mut __struct.link_rx_rate {
13340            let val = buf.get_u32_le();
13341            *v = val;
13342        }
13343        for v in &mut __struct.link_tx_max {
13344            let val = buf.get_u32_le();
13345            *v = val;
13346        }
13347        for v in &mut __struct.link_rx_max {
13348            let val = buf.get_u32_le();
13349            *v = val;
13350        }
13351        for v in &mut __struct.fan_speed {
13352            let val = buf.get_i16_le();
13353            *v = val;
13354        }
13355        __struct.mavtype = buf.get_u8();
13356        for v in &mut __struct.cpu_cores {
13357            let val = buf.get_u8();
13358            *v = val;
13359        }
13360        for v in &mut __struct.cpu_combined {
13361            let val = buf.get_u8();
13362            *v = val;
13363        }
13364        for v in &mut __struct.gpu_cores {
13365            let val = buf.get_u8();
13366            *v = val;
13367        }
13368        for v in &mut __struct.gpu_combined {
13369            let val = buf.get_u8();
13370            *v = val;
13371        }
13372        __struct.temperature_board = buf.get_i8();
13373        for v in &mut __struct.temperature_core {
13374            let val = buf.get_i8();
13375            *v = val;
13376        }
13377        Ok(__struct)
13378    }
13379    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13380        let mut __tmp = BytesMut::new(bytes);
13381        #[allow(clippy::absurd_extreme_comparisons)]
13382        #[allow(unused_comparisons)]
13383        if __tmp.remaining() < Self::ENCODED_LEN {
13384            panic!(
13385                "buffer is too small (need {} bytes, but got {})",
13386                Self::ENCODED_LEN,
13387                __tmp.remaining(),
13388            )
13389        }
13390        __tmp.put_u64_le(self.time_usec);
13391        __tmp.put_u32_le(self.uptime);
13392        __tmp.put_u32_le(self.ram_usage);
13393        __tmp.put_u32_le(self.ram_total);
13394        for val in &self.storage_type {
13395            __tmp.put_u32_le(*val);
13396        }
13397        for val in &self.storage_usage {
13398            __tmp.put_u32_le(*val);
13399        }
13400        for val in &self.storage_total {
13401            __tmp.put_u32_le(*val);
13402        }
13403        for val in &self.link_type {
13404            __tmp.put_u32_le(*val);
13405        }
13406        for val in &self.link_tx_rate {
13407            __tmp.put_u32_le(*val);
13408        }
13409        for val in &self.link_rx_rate {
13410            __tmp.put_u32_le(*val);
13411        }
13412        for val in &self.link_tx_max {
13413            __tmp.put_u32_le(*val);
13414        }
13415        for val in &self.link_rx_max {
13416            __tmp.put_u32_le(*val);
13417        }
13418        for val in &self.fan_speed {
13419            __tmp.put_i16_le(*val);
13420        }
13421        __tmp.put_u8(self.mavtype);
13422        for val in &self.cpu_cores {
13423            __tmp.put_u8(*val);
13424        }
13425        for val in &self.cpu_combined {
13426            __tmp.put_u8(*val);
13427        }
13428        for val in &self.gpu_cores {
13429            __tmp.put_u8(*val);
13430        }
13431        for val in &self.gpu_combined {
13432            __tmp.put_u8(*val);
13433        }
13434        __tmp.put_i8(self.temperature_board);
13435        for val in &self.temperature_core {
13436            __tmp.put_i8(*val);
13437        }
13438        if matches!(version, MavlinkVersion::V2) {
13439            let len = __tmp.len();
13440            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13441        } else {
13442            __tmp.len()
13443        }
13444    }
13445}
13446#[doc = "id: 258"]
13447#[doc = "Control vehicle tone generation (buzzer)."]
13448#[derive(Debug, Clone, PartialEq)]
13449#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13450#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13451pub struct PLAY_TUNE_DATA {
13452    #[doc = "System ID"]
13453    pub target_system: u8,
13454    #[doc = "Component ID"]
13455    pub target_component: u8,
13456    #[doc = "tune in board specific format"]
13457    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13458    pub tune: [u8; 30],
13459    #[doc = "tune extension (appended to tune)"]
13460    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13461    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13462    pub tune2: [u8; 200],
13463}
13464impl PLAY_TUNE_DATA {
13465    pub const ENCODED_LEN: usize = 232usize;
13466    pub const DEFAULT: Self = Self {
13467        target_system: 0_u8,
13468        target_component: 0_u8,
13469        tune: [0_u8; 30usize],
13470        tune2: [0_u8; 200usize],
13471    };
13472    #[cfg(feature = "arbitrary")]
13473    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13474        use arbitrary::{Arbitrary, Unstructured};
13475        let mut buf = [0u8; 1024];
13476        rng.fill_bytes(&mut buf);
13477        let mut unstructured = Unstructured::new(&buf);
13478        Self::arbitrary(&mut unstructured).unwrap_or_default()
13479    }
13480}
13481impl Default for PLAY_TUNE_DATA {
13482    fn default() -> Self {
13483        Self::DEFAULT.clone()
13484    }
13485}
13486impl MessageData for PLAY_TUNE_DATA {
13487    type Message = MavMessage;
13488    const ID: u32 = 258u32;
13489    const NAME: &'static str = "PLAY_TUNE";
13490    const EXTRA_CRC: u8 = 187u8;
13491    const ENCODED_LEN: usize = 232usize;
13492    fn deser(
13493        _version: MavlinkVersion,
13494        __input: &[u8],
13495    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13496        let avail_len = __input.len();
13497        let mut payload_buf = [0; Self::ENCODED_LEN];
13498        let mut buf = if avail_len < Self::ENCODED_LEN {
13499            payload_buf[0..avail_len].copy_from_slice(__input);
13500            Bytes::new(&payload_buf)
13501        } else {
13502            Bytes::new(__input)
13503        };
13504        let mut __struct = Self::default();
13505        __struct.target_system = buf.get_u8();
13506        __struct.target_component = buf.get_u8();
13507        for v in &mut __struct.tune {
13508            let val = buf.get_u8();
13509            *v = val;
13510        }
13511        for v in &mut __struct.tune2 {
13512            let val = buf.get_u8();
13513            *v = val;
13514        }
13515        Ok(__struct)
13516    }
13517    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13518        let mut __tmp = BytesMut::new(bytes);
13519        #[allow(clippy::absurd_extreme_comparisons)]
13520        #[allow(unused_comparisons)]
13521        if __tmp.remaining() < Self::ENCODED_LEN {
13522            panic!(
13523                "buffer is too small (need {} bytes, but got {})",
13524                Self::ENCODED_LEN,
13525                __tmp.remaining(),
13526            )
13527        }
13528        __tmp.put_u8(self.target_system);
13529        __tmp.put_u8(self.target_component);
13530        for val in &self.tune {
13531            __tmp.put_u8(*val);
13532        }
13533        for val in &self.tune2 {
13534            __tmp.put_u8(*val);
13535        }
13536        if matches!(version, MavlinkVersion::V2) {
13537            let len = __tmp.len();
13538            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13539        } else {
13540            __tmp.len()
13541        }
13542    }
13543}
13544#[doc = "id: 25"]
13545#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
13546#[derive(Debug, Clone, PartialEq)]
13547#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13548#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13549pub struct GPS_STATUS_DATA {
13550    #[doc = "Number of satellites visible"]
13551    pub satellites_visible: u8,
13552    #[doc = "Global satellite ID"]
13553    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13554    pub satellite_prn: [u8; 20],
13555    #[doc = "0: Satellite not used, 1: used for localization"]
13556    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13557    pub satellite_used: [u8; 20],
13558    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
13559    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13560    pub satellite_elevation: [u8; 20],
13561    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
13562    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13563    pub satellite_azimuth: [u8; 20],
13564    #[doc = "Signal to noise ratio of satellite"]
13565    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13566    pub satellite_snr: [u8; 20],
13567}
13568impl GPS_STATUS_DATA {
13569    pub const ENCODED_LEN: usize = 101usize;
13570    pub const DEFAULT: Self = Self {
13571        satellites_visible: 0_u8,
13572        satellite_prn: [0_u8; 20usize],
13573        satellite_used: [0_u8; 20usize],
13574        satellite_elevation: [0_u8; 20usize],
13575        satellite_azimuth: [0_u8; 20usize],
13576        satellite_snr: [0_u8; 20usize],
13577    };
13578    #[cfg(feature = "arbitrary")]
13579    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13580        use arbitrary::{Arbitrary, Unstructured};
13581        let mut buf = [0u8; 1024];
13582        rng.fill_bytes(&mut buf);
13583        let mut unstructured = Unstructured::new(&buf);
13584        Self::arbitrary(&mut unstructured).unwrap_or_default()
13585    }
13586}
13587impl Default for GPS_STATUS_DATA {
13588    fn default() -> Self {
13589        Self::DEFAULT.clone()
13590    }
13591}
13592impl MessageData for GPS_STATUS_DATA {
13593    type Message = MavMessage;
13594    const ID: u32 = 25u32;
13595    const NAME: &'static str = "GPS_STATUS";
13596    const EXTRA_CRC: u8 = 23u8;
13597    const ENCODED_LEN: usize = 101usize;
13598    fn deser(
13599        _version: MavlinkVersion,
13600        __input: &[u8],
13601    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13602        let avail_len = __input.len();
13603        let mut payload_buf = [0; Self::ENCODED_LEN];
13604        let mut buf = if avail_len < Self::ENCODED_LEN {
13605            payload_buf[0..avail_len].copy_from_slice(__input);
13606            Bytes::new(&payload_buf)
13607        } else {
13608            Bytes::new(__input)
13609        };
13610        let mut __struct = Self::default();
13611        __struct.satellites_visible = buf.get_u8();
13612        for v in &mut __struct.satellite_prn {
13613            let val = buf.get_u8();
13614            *v = val;
13615        }
13616        for v in &mut __struct.satellite_used {
13617            let val = buf.get_u8();
13618            *v = val;
13619        }
13620        for v in &mut __struct.satellite_elevation {
13621            let val = buf.get_u8();
13622            *v = val;
13623        }
13624        for v in &mut __struct.satellite_azimuth {
13625            let val = buf.get_u8();
13626            *v = val;
13627        }
13628        for v in &mut __struct.satellite_snr {
13629            let val = buf.get_u8();
13630            *v = val;
13631        }
13632        Ok(__struct)
13633    }
13634    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13635        let mut __tmp = BytesMut::new(bytes);
13636        #[allow(clippy::absurd_extreme_comparisons)]
13637        #[allow(unused_comparisons)]
13638        if __tmp.remaining() < Self::ENCODED_LEN {
13639            panic!(
13640                "buffer is too small (need {} bytes, but got {})",
13641                Self::ENCODED_LEN,
13642                __tmp.remaining(),
13643            )
13644        }
13645        __tmp.put_u8(self.satellites_visible);
13646        for val in &self.satellite_prn {
13647            __tmp.put_u8(*val);
13648        }
13649        for val in &self.satellite_used {
13650            __tmp.put_u8(*val);
13651        }
13652        for val in &self.satellite_elevation {
13653            __tmp.put_u8(*val);
13654        }
13655        for val in &self.satellite_azimuth {
13656            __tmp.put_u8(*val);
13657        }
13658        for val in &self.satellite_snr {
13659            __tmp.put_u8(*val);
13660        }
13661        if matches!(version, MavlinkVersion::V2) {
13662            let len = __tmp.len();
13663            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13664        } else {
13665            __tmp.len()
13666        }
13667    }
13668}
13669#[doc = "id: 44"]
13670#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
13671#[derive(Debug, Clone, PartialEq)]
13672#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13673#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13674pub struct MISSION_COUNT_DATA {
13675    #[doc = "Number of mission items in the sequence"]
13676    pub count: u16,
13677    #[doc = "System ID"]
13678    pub target_system: u8,
13679    #[doc = "Component ID"]
13680    pub target_component: u8,
13681    #[doc = "Mission type."]
13682    #[cfg_attr(feature = "serde", serde(default))]
13683    pub mission_type: MavMissionType,
13684    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
13685    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13686    pub opaque_id: u32,
13687}
13688impl MISSION_COUNT_DATA {
13689    pub const ENCODED_LEN: usize = 9usize;
13690    pub const DEFAULT: Self = Self {
13691        count: 0_u16,
13692        target_system: 0_u8,
13693        target_component: 0_u8,
13694        mission_type: MavMissionType::DEFAULT,
13695        opaque_id: 0_u32,
13696    };
13697    #[cfg(feature = "arbitrary")]
13698    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13699        use arbitrary::{Arbitrary, Unstructured};
13700        let mut buf = [0u8; 1024];
13701        rng.fill_bytes(&mut buf);
13702        let mut unstructured = Unstructured::new(&buf);
13703        Self::arbitrary(&mut unstructured).unwrap_or_default()
13704    }
13705}
13706impl Default for MISSION_COUNT_DATA {
13707    fn default() -> Self {
13708        Self::DEFAULT.clone()
13709    }
13710}
13711impl MessageData for MISSION_COUNT_DATA {
13712    type Message = MavMessage;
13713    const ID: u32 = 44u32;
13714    const NAME: &'static str = "MISSION_COUNT";
13715    const EXTRA_CRC: u8 = 221u8;
13716    const ENCODED_LEN: usize = 9usize;
13717    fn deser(
13718        _version: MavlinkVersion,
13719        __input: &[u8],
13720    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13721        let avail_len = __input.len();
13722        let mut payload_buf = [0; Self::ENCODED_LEN];
13723        let mut buf = if avail_len < Self::ENCODED_LEN {
13724            payload_buf[0..avail_len].copy_from_slice(__input);
13725            Bytes::new(&payload_buf)
13726        } else {
13727            Bytes::new(__input)
13728        };
13729        let mut __struct = Self::default();
13730        __struct.count = buf.get_u16_le();
13731        __struct.target_system = buf.get_u8();
13732        __struct.target_component = buf.get_u8();
13733        let tmp = buf.get_u8();
13734        __struct.mission_type =
13735            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13736                enum_type: "MavMissionType",
13737                value: tmp as u32,
13738            })?;
13739        __struct.opaque_id = buf.get_u32_le();
13740        Ok(__struct)
13741    }
13742    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13743        let mut __tmp = BytesMut::new(bytes);
13744        #[allow(clippy::absurd_extreme_comparisons)]
13745        #[allow(unused_comparisons)]
13746        if __tmp.remaining() < Self::ENCODED_LEN {
13747            panic!(
13748                "buffer is too small (need {} bytes, but got {})",
13749                Self::ENCODED_LEN,
13750                __tmp.remaining(),
13751            )
13752        }
13753        __tmp.put_u16_le(self.count);
13754        __tmp.put_u8(self.target_system);
13755        __tmp.put_u8(self.target_component);
13756        __tmp.put_u8(self.mission_type as u8);
13757        __tmp.put_u32_le(self.opaque_id);
13758        if matches!(version, MavlinkVersion::V2) {
13759            let len = __tmp.len();
13760            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13761        } else {
13762            __tmp.len()
13763        }
13764    }
13765}
13766#[doc = "id: 140"]
13767#[doc = "Set the vehicle attitude and body angular rates."]
13768#[derive(Debug, Clone, PartialEq)]
13769#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13770#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13771pub struct ACTUATOR_CONTROL_TARGET_DATA {
13772    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13773    pub time_usec: u64,
13774    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
13775    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13776    pub controls: [f32; 8],
13777    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
13778    pub group_mlx: u8,
13779}
13780impl ACTUATOR_CONTROL_TARGET_DATA {
13781    pub const ENCODED_LEN: usize = 41usize;
13782    pub const DEFAULT: Self = Self {
13783        time_usec: 0_u64,
13784        controls: [0.0_f32; 8usize],
13785        group_mlx: 0_u8,
13786    };
13787    #[cfg(feature = "arbitrary")]
13788    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13789        use arbitrary::{Arbitrary, Unstructured};
13790        let mut buf = [0u8; 1024];
13791        rng.fill_bytes(&mut buf);
13792        let mut unstructured = Unstructured::new(&buf);
13793        Self::arbitrary(&mut unstructured).unwrap_or_default()
13794    }
13795}
13796impl Default for ACTUATOR_CONTROL_TARGET_DATA {
13797    fn default() -> Self {
13798        Self::DEFAULT.clone()
13799    }
13800}
13801impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
13802    type Message = MavMessage;
13803    const ID: u32 = 140u32;
13804    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
13805    const EXTRA_CRC: u8 = 181u8;
13806    const ENCODED_LEN: usize = 41usize;
13807    fn deser(
13808        _version: MavlinkVersion,
13809        __input: &[u8],
13810    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13811        let avail_len = __input.len();
13812        let mut payload_buf = [0; Self::ENCODED_LEN];
13813        let mut buf = if avail_len < Self::ENCODED_LEN {
13814            payload_buf[0..avail_len].copy_from_slice(__input);
13815            Bytes::new(&payload_buf)
13816        } else {
13817            Bytes::new(__input)
13818        };
13819        let mut __struct = Self::default();
13820        __struct.time_usec = buf.get_u64_le();
13821        for v in &mut __struct.controls {
13822            let val = buf.get_f32_le();
13823            *v = val;
13824        }
13825        __struct.group_mlx = buf.get_u8();
13826        Ok(__struct)
13827    }
13828    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13829        let mut __tmp = BytesMut::new(bytes);
13830        #[allow(clippy::absurd_extreme_comparisons)]
13831        #[allow(unused_comparisons)]
13832        if __tmp.remaining() < Self::ENCODED_LEN {
13833            panic!(
13834                "buffer is too small (need {} bytes, but got {})",
13835                Self::ENCODED_LEN,
13836                __tmp.remaining(),
13837            )
13838        }
13839        __tmp.put_u64_le(self.time_usec);
13840        for val in &self.controls {
13841            __tmp.put_f32_le(*val);
13842        }
13843        __tmp.put_u8(self.group_mlx);
13844        if matches!(version, MavlinkVersion::V2) {
13845            let len = __tmp.len();
13846            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13847        } else {
13848            __tmp.len()
13849        }
13850    }
13851}
13852#[doc = "id: 22"]
13853#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
13854#[derive(Debug, Clone, PartialEq)]
13855#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13856#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13857pub struct PARAM_VALUE_DATA {
13858    #[doc = "Onboard parameter value"]
13859    pub param_value: f32,
13860    #[doc = "Total number of onboard parameters"]
13861    pub param_count: u16,
13862    #[doc = "Index of this onboard parameter"]
13863    pub param_index: u16,
13864    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
13865    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13866    pub param_id: [u8; 16],
13867    #[doc = "Onboard parameter type."]
13868    pub param_type: MavParamType,
13869}
13870impl PARAM_VALUE_DATA {
13871    pub const ENCODED_LEN: usize = 25usize;
13872    pub const DEFAULT: Self = Self {
13873        param_value: 0.0_f32,
13874        param_count: 0_u16,
13875        param_index: 0_u16,
13876        param_id: [0_u8; 16usize],
13877        param_type: MavParamType::DEFAULT,
13878    };
13879    #[cfg(feature = "arbitrary")]
13880    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13881        use arbitrary::{Arbitrary, Unstructured};
13882        let mut buf = [0u8; 1024];
13883        rng.fill_bytes(&mut buf);
13884        let mut unstructured = Unstructured::new(&buf);
13885        Self::arbitrary(&mut unstructured).unwrap_or_default()
13886    }
13887}
13888impl Default for PARAM_VALUE_DATA {
13889    fn default() -> Self {
13890        Self::DEFAULT.clone()
13891    }
13892}
13893impl MessageData for PARAM_VALUE_DATA {
13894    type Message = MavMessage;
13895    const ID: u32 = 22u32;
13896    const NAME: &'static str = "PARAM_VALUE";
13897    const EXTRA_CRC: u8 = 220u8;
13898    const ENCODED_LEN: usize = 25usize;
13899    fn deser(
13900        _version: MavlinkVersion,
13901        __input: &[u8],
13902    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13903        let avail_len = __input.len();
13904        let mut payload_buf = [0; Self::ENCODED_LEN];
13905        let mut buf = if avail_len < Self::ENCODED_LEN {
13906            payload_buf[0..avail_len].copy_from_slice(__input);
13907            Bytes::new(&payload_buf)
13908        } else {
13909            Bytes::new(__input)
13910        };
13911        let mut __struct = Self::default();
13912        __struct.param_value = buf.get_f32_le();
13913        __struct.param_count = buf.get_u16_le();
13914        __struct.param_index = buf.get_u16_le();
13915        for v in &mut __struct.param_id {
13916            let val = buf.get_u8();
13917            *v = val;
13918        }
13919        let tmp = buf.get_u8();
13920        __struct.param_type =
13921            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13922                enum_type: "MavParamType",
13923                value: tmp as u32,
13924            })?;
13925        Ok(__struct)
13926    }
13927    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13928        let mut __tmp = BytesMut::new(bytes);
13929        #[allow(clippy::absurd_extreme_comparisons)]
13930        #[allow(unused_comparisons)]
13931        if __tmp.remaining() < Self::ENCODED_LEN {
13932            panic!(
13933                "buffer is too small (need {} bytes, but got {})",
13934                Self::ENCODED_LEN,
13935                __tmp.remaining(),
13936            )
13937        }
13938        __tmp.put_f32_le(self.param_value);
13939        __tmp.put_u16_le(self.param_count);
13940        __tmp.put_u16_le(self.param_index);
13941        for val in &self.param_id {
13942            __tmp.put_u8(*val);
13943        }
13944        __tmp.put_u8(self.param_type as u8);
13945        if matches!(version, MavlinkVersion::V2) {
13946            let len = __tmp.len();
13947            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13948        } else {
13949            __tmp.len()
13950        }
13951    }
13952}
13953#[doc = "id: 270"]
13954#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
13955#[derive(Debug, Clone, PartialEq)]
13956#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13957#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13958pub struct VIDEO_STREAM_STATUS_DATA {
13959    #[doc = "Frame rate"]
13960    pub framerate: f32,
13961    #[doc = "Bit rate"]
13962    pub bitrate: u32,
13963    #[doc = "Bitmap of stream status flags"]
13964    pub flags: VideoStreamStatusFlags,
13965    #[doc = "Horizontal resolution"]
13966    pub resolution_h: u16,
13967    #[doc = "Vertical resolution"]
13968    pub resolution_v: u16,
13969    #[doc = "Video image rotation clockwise"]
13970    pub rotation: u16,
13971    #[doc = "Horizontal Field of view"]
13972    pub hfov: u16,
13973    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
13974    pub stream_id: u8,
13975    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
13976    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13977    pub camera_device_id: u8,
13978}
13979impl VIDEO_STREAM_STATUS_DATA {
13980    pub const ENCODED_LEN: usize = 20usize;
13981    pub const DEFAULT: Self = Self {
13982        framerate: 0.0_f32,
13983        bitrate: 0_u32,
13984        flags: VideoStreamStatusFlags::DEFAULT,
13985        resolution_h: 0_u16,
13986        resolution_v: 0_u16,
13987        rotation: 0_u16,
13988        hfov: 0_u16,
13989        stream_id: 0_u8,
13990        camera_device_id: 0_u8,
13991    };
13992    #[cfg(feature = "arbitrary")]
13993    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13994        use arbitrary::{Arbitrary, Unstructured};
13995        let mut buf = [0u8; 1024];
13996        rng.fill_bytes(&mut buf);
13997        let mut unstructured = Unstructured::new(&buf);
13998        Self::arbitrary(&mut unstructured).unwrap_or_default()
13999    }
14000}
14001impl Default for VIDEO_STREAM_STATUS_DATA {
14002    fn default() -> Self {
14003        Self::DEFAULT.clone()
14004    }
14005}
14006impl MessageData for VIDEO_STREAM_STATUS_DATA {
14007    type Message = MavMessage;
14008    const ID: u32 = 270u32;
14009    const NAME: &'static str = "VIDEO_STREAM_STATUS";
14010    const EXTRA_CRC: u8 = 59u8;
14011    const ENCODED_LEN: usize = 20usize;
14012    fn deser(
14013        _version: MavlinkVersion,
14014        __input: &[u8],
14015    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14016        let avail_len = __input.len();
14017        let mut payload_buf = [0; Self::ENCODED_LEN];
14018        let mut buf = if avail_len < Self::ENCODED_LEN {
14019            payload_buf[0..avail_len].copy_from_slice(__input);
14020            Bytes::new(&payload_buf)
14021        } else {
14022            Bytes::new(__input)
14023        };
14024        let mut __struct = Self::default();
14025        __struct.framerate = buf.get_f32_le();
14026        __struct.bitrate = buf.get_u32_le();
14027        let tmp = buf.get_u16_le();
14028        __struct.flags = VideoStreamStatusFlags::from_bits(
14029            tmp & VideoStreamStatusFlags::all().bits(),
14030        )
14031        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14032            flag_type: "VideoStreamStatusFlags",
14033            value: tmp as u32,
14034        })?;
14035        __struct.resolution_h = buf.get_u16_le();
14036        __struct.resolution_v = buf.get_u16_le();
14037        __struct.rotation = buf.get_u16_le();
14038        __struct.hfov = buf.get_u16_le();
14039        __struct.stream_id = buf.get_u8();
14040        __struct.camera_device_id = buf.get_u8();
14041        Ok(__struct)
14042    }
14043    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14044        let mut __tmp = BytesMut::new(bytes);
14045        #[allow(clippy::absurd_extreme_comparisons)]
14046        #[allow(unused_comparisons)]
14047        if __tmp.remaining() < Self::ENCODED_LEN {
14048            panic!(
14049                "buffer is too small (need {} bytes, but got {})",
14050                Self::ENCODED_LEN,
14051                __tmp.remaining(),
14052            )
14053        }
14054        __tmp.put_f32_le(self.framerate);
14055        __tmp.put_u32_le(self.bitrate);
14056        __tmp.put_u16_le(self.flags.bits());
14057        __tmp.put_u16_le(self.resolution_h);
14058        __tmp.put_u16_le(self.resolution_v);
14059        __tmp.put_u16_le(self.rotation);
14060        __tmp.put_u16_le(self.hfov);
14061        __tmp.put_u8(self.stream_id);
14062        __tmp.put_u8(self.camera_device_id);
14063        if matches!(version, MavlinkVersion::V2) {
14064            let len = __tmp.len();
14065            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14066        } else {
14067            __tmp.len()
14068        }
14069    }
14070}
14071#[doc = "id: 60051"]
14072#[doc = "Drone position."]
14073#[derive(Debug, Clone, PartialEq)]
14074#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14075#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14076pub struct AVSS_DRONE_POSITION_DATA {
14077    #[doc = "Timestamp (time since FC boot)."]
14078    pub time_boot_ms: u32,
14079    #[doc = "Latitude, expressed"]
14080    pub lat: i32,
14081    #[doc = "Longitude, expressed"]
14082    pub lon: i32,
14083    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
14084    pub alt: i32,
14085    #[doc = "Altitude above ground, This altitude is measured by a ultrasound, Laser rangefinder or millimeter-wave radar"]
14086    pub ground_alt: f32,
14087    #[doc = "This altitude is measured by a barometer"]
14088    pub barometer_alt: f32,
14089}
14090impl AVSS_DRONE_POSITION_DATA {
14091    pub const ENCODED_LEN: usize = 24usize;
14092    pub const DEFAULT: Self = Self {
14093        time_boot_ms: 0_u32,
14094        lat: 0_i32,
14095        lon: 0_i32,
14096        alt: 0_i32,
14097        ground_alt: 0.0_f32,
14098        barometer_alt: 0.0_f32,
14099    };
14100    #[cfg(feature = "arbitrary")]
14101    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14102        use arbitrary::{Arbitrary, Unstructured};
14103        let mut buf = [0u8; 1024];
14104        rng.fill_bytes(&mut buf);
14105        let mut unstructured = Unstructured::new(&buf);
14106        Self::arbitrary(&mut unstructured).unwrap_or_default()
14107    }
14108}
14109impl Default for AVSS_DRONE_POSITION_DATA {
14110    fn default() -> Self {
14111        Self::DEFAULT.clone()
14112    }
14113}
14114impl MessageData for AVSS_DRONE_POSITION_DATA {
14115    type Message = MavMessage;
14116    const ID: u32 = 60051u32;
14117    const NAME: &'static str = "AVSS_DRONE_POSITION";
14118    const EXTRA_CRC: u8 = 245u8;
14119    const ENCODED_LEN: usize = 24usize;
14120    fn deser(
14121        _version: MavlinkVersion,
14122        __input: &[u8],
14123    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14124        let avail_len = __input.len();
14125        let mut payload_buf = [0; Self::ENCODED_LEN];
14126        let mut buf = if avail_len < Self::ENCODED_LEN {
14127            payload_buf[0..avail_len].copy_from_slice(__input);
14128            Bytes::new(&payload_buf)
14129        } else {
14130            Bytes::new(__input)
14131        };
14132        let mut __struct = Self::default();
14133        __struct.time_boot_ms = buf.get_u32_le();
14134        __struct.lat = buf.get_i32_le();
14135        __struct.lon = buf.get_i32_le();
14136        __struct.alt = buf.get_i32_le();
14137        __struct.ground_alt = buf.get_f32_le();
14138        __struct.barometer_alt = buf.get_f32_le();
14139        Ok(__struct)
14140    }
14141    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14142        let mut __tmp = BytesMut::new(bytes);
14143        #[allow(clippy::absurd_extreme_comparisons)]
14144        #[allow(unused_comparisons)]
14145        if __tmp.remaining() < Self::ENCODED_LEN {
14146            panic!(
14147                "buffer is too small (need {} bytes, but got {})",
14148                Self::ENCODED_LEN,
14149                __tmp.remaining(),
14150            )
14151        }
14152        __tmp.put_u32_le(self.time_boot_ms);
14153        __tmp.put_i32_le(self.lat);
14154        __tmp.put_i32_le(self.lon);
14155        __tmp.put_i32_le(self.alt);
14156        __tmp.put_f32_le(self.ground_alt);
14157        __tmp.put_f32_le(self.barometer_alt);
14158        if matches!(version, MavlinkVersion::V2) {
14159            let len = __tmp.len();
14160            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14161        } else {
14162            __tmp.len()
14163        }
14164    }
14165}
14166#[doc = "id: 23"]
14167#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
14168#[derive(Debug, Clone, PartialEq)]
14169#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14170#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14171pub struct PARAM_SET_DATA {
14172    #[doc = "Onboard parameter value"]
14173    pub param_value: f32,
14174    #[doc = "System ID"]
14175    pub target_system: u8,
14176    #[doc = "Component ID"]
14177    pub target_component: u8,
14178    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
14179    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14180    pub param_id: [u8; 16],
14181    #[doc = "Onboard parameter type."]
14182    pub param_type: MavParamType,
14183}
14184impl PARAM_SET_DATA {
14185    pub const ENCODED_LEN: usize = 23usize;
14186    pub const DEFAULT: Self = Self {
14187        param_value: 0.0_f32,
14188        target_system: 0_u8,
14189        target_component: 0_u8,
14190        param_id: [0_u8; 16usize],
14191        param_type: MavParamType::DEFAULT,
14192    };
14193    #[cfg(feature = "arbitrary")]
14194    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14195        use arbitrary::{Arbitrary, Unstructured};
14196        let mut buf = [0u8; 1024];
14197        rng.fill_bytes(&mut buf);
14198        let mut unstructured = Unstructured::new(&buf);
14199        Self::arbitrary(&mut unstructured).unwrap_or_default()
14200    }
14201}
14202impl Default for PARAM_SET_DATA {
14203    fn default() -> Self {
14204        Self::DEFAULT.clone()
14205    }
14206}
14207impl MessageData for PARAM_SET_DATA {
14208    type Message = MavMessage;
14209    const ID: u32 = 23u32;
14210    const NAME: &'static str = "PARAM_SET";
14211    const EXTRA_CRC: u8 = 168u8;
14212    const ENCODED_LEN: usize = 23usize;
14213    fn deser(
14214        _version: MavlinkVersion,
14215        __input: &[u8],
14216    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14217        let avail_len = __input.len();
14218        let mut payload_buf = [0; Self::ENCODED_LEN];
14219        let mut buf = if avail_len < Self::ENCODED_LEN {
14220            payload_buf[0..avail_len].copy_from_slice(__input);
14221            Bytes::new(&payload_buf)
14222        } else {
14223            Bytes::new(__input)
14224        };
14225        let mut __struct = Self::default();
14226        __struct.param_value = buf.get_f32_le();
14227        __struct.target_system = buf.get_u8();
14228        __struct.target_component = buf.get_u8();
14229        for v in &mut __struct.param_id {
14230            let val = buf.get_u8();
14231            *v = val;
14232        }
14233        let tmp = buf.get_u8();
14234        __struct.param_type =
14235            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14236                enum_type: "MavParamType",
14237                value: tmp as u32,
14238            })?;
14239        Ok(__struct)
14240    }
14241    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14242        let mut __tmp = BytesMut::new(bytes);
14243        #[allow(clippy::absurd_extreme_comparisons)]
14244        #[allow(unused_comparisons)]
14245        if __tmp.remaining() < Self::ENCODED_LEN {
14246            panic!(
14247                "buffer is too small (need {} bytes, but got {})",
14248                Self::ENCODED_LEN,
14249                __tmp.remaining(),
14250            )
14251        }
14252        __tmp.put_f32_le(self.param_value);
14253        __tmp.put_u8(self.target_system);
14254        __tmp.put_u8(self.target_component);
14255        for val in &self.param_id {
14256            __tmp.put_u8(*val);
14257        }
14258        __tmp.put_u8(self.param_type as u8);
14259        if matches!(version, MavlinkVersion::V2) {
14260            let len = __tmp.len();
14261            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14262        } else {
14263            __tmp.len()
14264        }
14265    }
14266}
14267#[doc = "id: 388"]
14268#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
14269#[derive(Debug, Clone, PartialEq)]
14270#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14271#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14272pub struct CAN_FILTER_MODIFY_DATA {
14273    #[doc = "filter IDs, length num_ids"]
14274    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14275    pub ids: [u16; 16],
14276    #[doc = "System ID."]
14277    pub target_system: u8,
14278    #[doc = "Component ID."]
14279    pub target_component: u8,
14280    #[doc = "bus number"]
14281    pub bus: u8,
14282    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
14283    pub operation: CanFilterOp,
14284    #[doc = "number of IDs in filter list"]
14285    pub num_ids: u8,
14286}
14287impl CAN_FILTER_MODIFY_DATA {
14288    pub const ENCODED_LEN: usize = 37usize;
14289    pub const DEFAULT: Self = Self {
14290        ids: [0_u16; 16usize],
14291        target_system: 0_u8,
14292        target_component: 0_u8,
14293        bus: 0_u8,
14294        operation: CanFilterOp::DEFAULT,
14295        num_ids: 0_u8,
14296    };
14297    #[cfg(feature = "arbitrary")]
14298    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14299        use arbitrary::{Arbitrary, Unstructured};
14300        let mut buf = [0u8; 1024];
14301        rng.fill_bytes(&mut buf);
14302        let mut unstructured = Unstructured::new(&buf);
14303        Self::arbitrary(&mut unstructured).unwrap_or_default()
14304    }
14305}
14306impl Default for CAN_FILTER_MODIFY_DATA {
14307    fn default() -> Self {
14308        Self::DEFAULT.clone()
14309    }
14310}
14311impl MessageData for CAN_FILTER_MODIFY_DATA {
14312    type Message = MavMessage;
14313    const ID: u32 = 388u32;
14314    const NAME: &'static str = "CAN_FILTER_MODIFY";
14315    const EXTRA_CRC: u8 = 8u8;
14316    const ENCODED_LEN: usize = 37usize;
14317    fn deser(
14318        _version: MavlinkVersion,
14319        __input: &[u8],
14320    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14321        let avail_len = __input.len();
14322        let mut payload_buf = [0; Self::ENCODED_LEN];
14323        let mut buf = if avail_len < Self::ENCODED_LEN {
14324            payload_buf[0..avail_len].copy_from_slice(__input);
14325            Bytes::new(&payload_buf)
14326        } else {
14327            Bytes::new(__input)
14328        };
14329        let mut __struct = Self::default();
14330        for v in &mut __struct.ids {
14331            let val = buf.get_u16_le();
14332            *v = val;
14333        }
14334        __struct.target_system = buf.get_u8();
14335        __struct.target_component = buf.get_u8();
14336        __struct.bus = buf.get_u8();
14337        let tmp = buf.get_u8();
14338        __struct.operation =
14339            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14340                enum_type: "CanFilterOp",
14341                value: tmp as u32,
14342            })?;
14343        __struct.num_ids = buf.get_u8();
14344        Ok(__struct)
14345    }
14346    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14347        let mut __tmp = BytesMut::new(bytes);
14348        #[allow(clippy::absurd_extreme_comparisons)]
14349        #[allow(unused_comparisons)]
14350        if __tmp.remaining() < Self::ENCODED_LEN {
14351            panic!(
14352                "buffer is too small (need {} bytes, but got {})",
14353                Self::ENCODED_LEN,
14354                __tmp.remaining(),
14355            )
14356        }
14357        for val in &self.ids {
14358            __tmp.put_u16_le(*val);
14359        }
14360        __tmp.put_u8(self.target_system);
14361        __tmp.put_u8(self.target_component);
14362        __tmp.put_u8(self.bus);
14363        __tmp.put_u8(self.operation as u8);
14364        __tmp.put_u8(self.num_ids);
14365        if matches!(version, MavlinkVersion::V2) {
14366            let len = __tmp.len();
14367            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14368        } else {
14369            __tmp.len()
14370        }
14371    }
14372}
14373#[doc = "id: 282"]
14374#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
14375#[derive(Debug, Clone, PartialEq)]
14376#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14377#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14378pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
14379    #[doc = "High level gimbal manager flags to use."]
14380    pub flags: GimbalManagerFlags,
14381    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
14382    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14383    pub q: [f32; 4],
14384    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
14385    pub angular_velocity_x: f32,
14386    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
14387    pub angular_velocity_y: f32,
14388    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
14389    pub angular_velocity_z: f32,
14390    #[doc = "System ID"]
14391    pub target_system: u8,
14392    #[doc = "Component ID"]
14393    pub target_component: u8,
14394    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
14395    pub gimbal_device_id: u8,
14396}
14397impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
14398    pub const ENCODED_LEN: usize = 35usize;
14399    pub const DEFAULT: Self = Self {
14400        flags: GimbalManagerFlags::DEFAULT,
14401        q: [0.0_f32; 4usize],
14402        angular_velocity_x: 0.0_f32,
14403        angular_velocity_y: 0.0_f32,
14404        angular_velocity_z: 0.0_f32,
14405        target_system: 0_u8,
14406        target_component: 0_u8,
14407        gimbal_device_id: 0_u8,
14408    };
14409    #[cfg(feature = "arbitrary")]
14410    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14411        use arbitrary::{Arbitrary, Unstructured};
14412        let mut buf = [0u8; 1024];
14413        rng.fill_bytes(&mut buf);
14414        let mut unstructured = Unstructured::new(&buf);
14415        Self::arbitrary(&mut unstructured).unwrap_or_default()
14416    }
14417}
14418impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
14419    fn default() -> Self {
14420        Self::DEFAULT.clone()
14421    }
14422}
14423impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
14424    type Message = MavMessage;
14425    const ID: u32 = 282u32;
14426    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
14427    const EXTRA_CRC: u8 = 123u8;
14428    const ENCODED_LEN: usize = 35usize;
14429    fn deser(
14430        _version: MavlinkVersion,
14431        __input: &[u8],
14432    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14433        let avail_len = __input.len();
14434        let mut payload_buf = [0; Self::ENCODED_LEN];
14435        let mut buf = if avail_len < Self::ENCODED_LEN {
14436            payload_buf[0..avail_len].copy_from_slice(__input);
14437            Bytes::new(&payload_buf)
14438        } else {
14439            Bytes::new(__input)
14440        };
14441        let mut __struct = Self::default();
14442        let tmp = buf.get_u32_le();
14443        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
14444            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14445                flag_type: "GimbalManagerFlags",
14446                value: tmp as u32,
14447            })?;
14448        for v in &mut __struct.q {
14449            let val = buf.get_f32_le();
14450            *v = val;
14451        }
14452        __struct.angular_velocity_x = buf.get_f32_le();
14453        __struct.angular_velocity_y = buf.get_f32_le();
14454        __struct.angular_velocity_z = buf.get_f32_le();
14455        __struct.target_system = buf.get_u8();
14456        __struct.target_component = buf.get_u8();
14457        __struct.gimbal_device_id = buf.get_u8();
14458        Ok(__struct)
14459    }
14460    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14461        let mut __tmp = BytesMut::new(bytes);
14462        #[allow(clippy::absurd_extreme_comparisons)]
14463        #[allow(unused_comparisons)]
14464        if __tmp.remaining() < Self::ENCODED_LEN {
14465            panic!(
14466                "buffer is too small (need {} bytes, but got {})",
14467                Self::ENCODED_LEN,
14468                __tmp.remaining(),
14469            )
14470        }
14471        __tmp.put_u32_le(self.flags.bits());
14472        for val in &self.q {
14473            __tmp.put_f32_le(*val);
14474        }
14475        __tmp.put_f32_le(self.angular_velocity_x);
14476        __tmp.put_f32_le(self.angular_velocity_y);
14477        __tmp.put_f32_le(self.angular_velocity_z);
14478        __tmp.put_u8(self.target_system);
14479        __tmp.put_u8(self.target_component);
14480        __tmp.put_u8(self.gimbal_device_id);
14481        if matches!(version, MavlinkVersion::V2) {
14482            let len = __tmp.len();
14483            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14484        } else {
14485            __tmp.len()
14486        }
14487    }
14488}
14489#[doc = "id: 117"]
14490#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
14491#[derive(Debug, Clone, PartialEq)]
14492#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14493#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14494pub struct LOG_REQUEST_LIST_DATA {
14495    #[doc = "First log id (0 for first available)"]
14496    pub start: u16,
14497    #[doc = "Last log id (0xffff for last available)"]
14498    pub end: u16,
14499    #[doc = "System ID"]
14500    pub target_system: u8,
14501    #[doc = "Component ID"]
14502    pub target_component: u8,
14503}
14504impl LOG_REQUEST_LIST_DATA {
14505    pub const ENCODED_LEN: usize = 6usize;
14506    pub const DEFAULT: Self = Self {
14507        start: 0_u16,
14508        end: 0_u16,
14509        target_system: 0_u8,
14510        target_component: 0_u8,
14511    };
14512    #[cfg(feature = "arbitrary")]
14513    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14514        use arbitrary::{Arbitrary, Unstructured};
14515        let mut buf = [0u8; 1024];
14516        rng.fill_bytes(&mut buf);
14517        let mut unstructured = Unstructured::new(&buf);
14518        Self::arbitrary(&mut unstructured).unwrap_or_default()
14519    }
14520}
14521impl Default for LOG_REQUEST_LIST_DATA {
14522    fn default() -> Self {
14523        Self::DEFAULT.clone()
14524    }
14525}
14526impl MessageData for LOG_REQUEST_LIST_DATA {
14527    type Message = MavMessage;
14528    const ID: u32 = 117u32;
14529    const NAME: &'static str = "LOG_REQUEST_LIST";
14530    const EXTRA_CRC: u8 = 128u8;
14531    const ENCODED_LEN: usize = 6usize;
14532    fn deser(
14533        _version: MavlinkVersion,
14534        __input: &[u8],
14535    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14536        let avail_len = __input.len();
14537        let mut payload_buf = [0; Self::ENCODED_LEN];
14538        let mut buf = if avail_len < Self::ENCODED_LEN {
14539            payload_buf[0..avail_len].copy_from_slice(__input);
14540            Bytes::new(&payload_buf)
14541        } else {
14542            Bytes::new(__input)
14543        };
14544        let mut __struct = Self::default();
14545        __struct.start = buf.get_u16_le();
14546        __struct.end = buf.get_u16_le();
14547        __struct.target_system = buf.get_u8();
14548        __struct.target_component = buf.get_u8();
14549        Ok(__struct)
14550    }
14551    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14552        let mut __tmp = BytesMut::new(bytes);
14553        #[allow(clippy::absurd_extreme_comparisons)]
14554        #[allow(unused_comparisons)]
14555        if __tmp.remaining() < Self::ENCODED_LEN {
14556            panic!(
14557                "buffer is too small (need {} bytes, but got {})",
14558                Self::ENCODED_LEN,
14559                __tmp.remaining(),
14560            )
14561        }
14562        __tmp.put_u16_le(self.start);
14563        __tmp.put_u16_le(self.end);
14564        __tmp.put_u8(self.target_system);
14565        __tmp.put_u8(self.target_component);
14566        if matches!(version, MavlinkVersion::V2) {
14567            let len = __tmp.len();
14568            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14569        } else {
14570            __tmp.len()
14571        }
14572    }
14573}
14574#[doc = "id: 61"]
14575#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
14576#[derive(Debug, Clone, PartialEq)]
14577#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14578#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14579pub struct ATTITUDE_QUATERNION_COV_DATA {
14580    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14581    pub time_usec: u64,
14582    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
14583    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14584    pub q: [f32; 4],
14585    #[doc = "Roll angular speed"]
14586    pub rollspeed: f32,
14587    #[doc = "Pitch angular speed"]
14588    pub pitchspeed: f32,
14589    #[doc = "Yaw angular speed"]
14590    pub yawspeed: f32,
14591    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
14592    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14593    pub covariance: [f32; 9],
14594}
14595impl ATTITUDE_QUATERNION_COV_DATA {
14596    pub const ENCODED_LEN: usize = 72usize;
14597    pub const DEFAULT: Self = Self {
14598        time_usec: 0_u64,
14599        q: [0.0_f32; 4usize],
14600        rollspeed: 0.0_f32,
14601        pitchspeed: 0.0_f32,
14602        yawspeed: 0.0_f32,
14603        covariance: [0.0_f32; 9usize],
14604    };
14605    #[cfg(feature = "arbitrary")]
14606    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14607        use arbitrary::{Arbitrary, Unstructured};
14608        let mut buf = [0u8; 1024];
14609        rng.fill_bytes(&mut buf);
14610        let mut unstructured = Unstructured::new(&buf);
14611        Self::arbitrary(&mut unstructured).unwrap_or_default()
14612    }
14613}
14614impl Default for ATTITUDE_QUATERNION_COV_DATA {
14615    fn default() -> Self {
14616        Self::DEFAULT.clone()
14617    }
14618}
14619impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
14620    type Message = MavMessage;
14621    const ID: u32 = 61u32;
14622    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
14623    const EXTRA_CRC: u8 = 167u8;
14624    const ENCODED_LEN: usize = 72usize;
14625    fn deser(
14626        _version: MavlinkVersion,
14627        __input: &[u8],
14628    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14629        let avail_len = __input.len();
14630        let mut payload_buf = [0; Self::ENCODED_LEN];
14631        let mut buf = if avail_len < Self::ENCODED_LEN {
14632            payload_buf[0..avail_len].copy_from_slice(__input);
14633            Bytes::new(&payload_buf)
14634        } else {
14635            Bytes::new(__input)
14636        };
14637        let mut __struct = Self::default();
14638        __struct.time_usec = buf.get_u64_le();
14639        for v in &mut __struct.q {
14640            let val = buf.get_f32_le();
14641            *v = val;
14642        }
14643        __struct.rollspeed = buf.get_f32_le();
14644        __struct.pitchspeed = buf.get_f32_le();
14645        __struct.yawspeed = buf.get_f32_le();
14646        for v in &mut __struct.covariance {
14647            let val = buf.get_f32_le();
14648            *v = val;
14649        }
14650        Ok(__struct)
14651    }
14652    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14653        let mut __tmp = BytesMut::new(bytes);
14654        #[allow(clippy::absurd_extreme_comparisons)]
14655        #[allow(unused_comparisons)]
14656        if __tmp.remaining() < Self::ENCODED_LEN {
14657            panic!(
14658                "buffer is too small (need {} bytes, but got {})",
14659                Self::ENCODED_LEN,
14660                __tmp.remaining(),
14661            )
14662        }
14663        __tmp.put_u64_le(self.time_usec);
14664        for val in &self.q {
14665            __tmp.put_f32_le(*val);
14666        }
14667        __tmp.put_f32_le(self.rollspeed);
14668        __tmp.put_f32_le(self.pitchspeed);
14669        __tmp.put_f32_le(self.yawspeed);
14670        for val in &self.covariance {
14671            __tmp.put_f32_le(*val);
14672        }
14673        if matches!(version, MavlinkVersion::V2) {
14674            let len = __tmp.len();
14675            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14676        } else {
14677            __tmp.len()
14678        }
14679    }
14680}
14681#[doc = "id: 63"]
14682#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
14683#[derive(Debug, Clone, PartialEq)]
14684#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14685#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14686pub struct GLOBAL_POSITION_INT_COV_DATA {
14687    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14688    pub time_usec: u64,
14689    #[doc = "Latitude"]
14690    pub lat: i32,
14691    #[doc = "Longitude"]
14692    pub lon: i32,
14693    #[doc = "Altitude in meters above MSL"]
14694    pub alt: i32,
14695    #[doc = "Altitude above ground"]
14696    pub relative_alt: i32,
14697    #[doc = "Ground X Speed (Latitude)"]
14698    pub vx: f32,
14699    #[doc = "Ground Y Speed (Longitude)"]
14700    pub vy: f32,
14701    #[doc = "Ground Z Speed (Altitude)"]
14702    pub vz: f32,
14703    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
14704    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14705    pub covariance: [f32; 36],
14706    #[doc = "Class id of the estimator this estimate originated from."]
14707    pub estimator_type: MavEstimatorType,
14708}
14709impl GLOBAL_POSITION_INT_COV_DATA {
14710    pub const ENCODED_LEN: usize = 181usize;
14711    pub const DEFAULT: Self = Self {
14712        time_usec: 0_u64,
14713        lat: 0_i32,
14714        lon: 0_i32,
14715        alt: 0_i32,
14716        relative_alt: 0_i32,
14717        vx: 0.0_f32,
14718        vy: 0.0_f32,
14719        vz: 0.0_f32,
14720        covariance: [0.0_f32; 36usize],
14721        estimator_type: MavEstimatorType::DEFAULT,
14722    };
14723    #[cfg(feature = "arbitrary")]
14724    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14725        use arbitrary::{Arbitrary, Unstructured};
14726        let mut buf = [0u8; 1024];
14727        rng.fill_bytes(&mut buf);
14728        let mut unstructured = Unstructured::new(&buf);
14729        Self::arbitrary(&mut unstructured).unwrap_or_default()
14730    }
14731}
14732impl Default for GLOBAL_POSITION_INT_COV_DATA {
14733    fn default() -> Self {
14734        Self::DEFAULT.clone()
14735    }
14736}
14737impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
14738    type Message = MavMessage;
14739    const ID: u32 = 63u32;
14740    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
14741    const EXTRA_CRC: u8 = 119u8;
14742    const ENCODED_LEN: usize = 181usize;
14743    fn deser(
14744        _version: MavlinkVersion,
14745        __input: &[u8],
14746    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14747        let avail_len = __input.len();
14748        let mut payload_buf = [0; Self::ENCODED_LEN];
14749        let mut buf = if avail_len < Self::ENCODED_LEN {
14750            payload_buf[0..avail_len].copy_from_slice(__input);
14751            Bytes::new(&payload_buf)
14752        } else {
14753            Bytes::new(__input)
14754        };
14755        let mut __struct = Self::default();
14756        __struct.time_usec = buf.get_u64_le();
14757        __struct.lat = buf.get_i32_le();
14758        __struct.lon = buf.get_i32_le();
14759        __struct.alt = buf.get_i32_le();
14760        __struct.relative_alt = buf.get_i32_le();
14761        __struct.vx = buf.get_f32_le();
14762        __struct.vy = buf.get_f32_le();
14763        __struct.vz = buf.get_f32_le();
14764        for v in &mut __struct.covariance {
14765            let val = buf.get_f32_le();
14766            *v = val;
14767        }
14768        let tmp = buf.get_u8();
14769        __struct.estimator_type =
14770            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14771                enum_type: "MavEstimatorType",
14772                value: tmp as u32,
14773            })?;
14774        Ok(__struct)
14775    }
14776    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14777        let mut __tmp = BytesMut::new(bytes);
14778        #[allow(clippy::absurd_extreme_comparisons)]
14779        #[allow(unused_comparisons)]
14780        if __tmp.remaining() < Self::ENCODED_LEN {
14781            panic!(
14782                "buffer is too small (need {} bytes, but got {})",
14783                Self::ENCODED_LEN,
14784                __tmp.remaining(),
14785            )
14786        }
14787        __tmp.put_u64_le(self.time_usec);
14788        __tmp.put_i32_le(self.lat);
14789        __tmp.put_i32_le(self.lon);
14790        __tmp.put_i32_le(self.alt);
14791        __tmp.put_i32_le(self.relative_alt);
14792        __tmp.put_f32_le(self.vx);
14793        __tmp.put_f32_le(self.vy);
14794        __tmp.put_f32_le(self.vz);
14795        for val in &self.covariance {
14796            __tmp.put_f32_le(*val);
14797        }
14798        __tmp.put_u8(self.estimator_type as u8);
14799        if matches!(version, MavlinkVersion::V2) {
14800            let len = __tmp.len();
14801            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14802        } else {
14803            __tmp.len()
14804        }
14805    }
14806}
14807#[doc = "id: 256"]
14808#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
14809#[derive(Debug, Clone, PartialEq)]
14810#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14811#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14812pub struct SETUP_SIGNING_DATA {
14813    #[doc = "initial timestamp"]
14814    pub initial_timestamp: u64,
14815    #[doc = "system id of the target"]
14816    pub target_system: u8,
14817    #[doc = "component ID of the target"]
14818    pub target_component: u8,
14819    #[doc = "signing key"]
14820    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14821    pub secret_key: [u8; 32],
14822}
14823impl SETUP_SIGNING_DATA {
14824    pub const ENCODED_LEN: usize = 42usize;
14825    pub const DEFAULT: Self = Self {
14826        initial_timestamp: 0_u64,
14827        target_system: 0_u8,
14828        target_component: 0_u8,
14829        secret_key: [0_u8; 32usize],
14830    };
14831    #[cfg(feature = "arbitrary")]
14832    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14833        use arbitrary::{Arbitrary, Unstructured};
14834        let mut buf = [0u8; 1024];
14835        rng.fill_bytes(&mut buf);
14836        let mut unstructured = Unstructured::new(&buf);
14837        Self::arbitrary(&mut unstructured).unwrap_or_default()
14838    }
14839}
14840impl Default for SETUP_SIGNING_DATA {
14841    fn default() -> Self {
14842        Self::DEFAULT.clone()
14843    }
14844}
14845impl MessageData for SETUP_SIGNING_DATA {
14846    type Message = MavMessage;
14847    const ID: u32 = 256u32;
14848    const NAME: &'static str = "SETUP_SIGNING";
14849    const EXTRA_CRC: u8 = 71u8;
14850    const ENCODED_LEN: usize = 42usize;
14851    fn deser(
14852        _version: MavlinkVersion,
14853        __input: &[u8],
14854    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14855        let avail_len = __input.len();
14856        let mut payload_buf = [0; Self::ENCODED_LEN];
14857        let mut buf = if avail_len < Self::ENCODED_LEN {
14858            payload_buf[0..avail_len].copy_from_slice(__input);
14859            Bytes::new(&payload_buf)
14860        } else {
14861            Bytes::new(__input)
14862        };
14863        let mut __struct = Self::default();
14864        __struct.initial_timestamp = buf.get_u64_le();
14865        __struct.target_system = buf.get_u8();
14866        __struct.target_component = buf.get_u8();
14867        for v in &mut __struct.secret_key {
14868            let val = buf.get_u8();
14869            *v = val;
14870        }
14871        Ok(__struct)
14872    }
14873    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14874        let mut __tmp = BytesMut::new(bytes);
14875        #[allow(clippy::absurd_extreme_comparisons)]
14876        #[allow(unused_comparisons)]
14877        if __tmp.remaining() < Self::ENCODED_LEN {
14878            panic!(
14879                "buffer is too small (need {} bytes, but got {})",
14880                Self::ENCODED_LEN,
14881                __tmp.remaining(),
14882            )
14883        }
14884        __tmp.put_u64_le(self.initial_timestamp);
14885        __tmp.put_u8(self.target_system);
14886        __tmp.put_u8(self.target_component);
14887        for val in &self.secret_key {
14888            __tmp.put_u8(*val);
14889        }
14890        if matches!(version, MavlinkVersion::V2) {
14891            let len = __tmp.len();
14892            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14893        } else {
14894            __tmp.len()
14895        }
14896    }
14897}
14898#[doc = "id: 321"]
14899#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
14900#[derive(Debug, Clone, PartialEq)]
14901#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14902#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14903pub struct PARAM_EXT_REQUEST_LIST_DATA {
14904    #[doc = "System ID"]
14905    pub target_system: u8,
14906    #[doc = "Component ID"]
14907    pub target_component: u8,
14908}
14909impl PARAM_EXT_REQUEST_LIST_DATA {
14910    pub const ENCODED_LEN: usize = 2usize;
14911    pub const DEFAULT: Self = Self {
14912        target_system: 0_u8,
14913        target_component: 0_u8,
14914    };
14915    #[cfg(feature = "arbitrary")]
14916    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14917        use arbitrary::{Arbitrary, Unstructured};
14918        let mut buf = [0u8; 1024];
14919        rng.fill_bytes(&mut buf);
14920        let mut unstructured = Unstructured::new(&buf);
14921        Self::arbitrary(&mut unstructured).unwrap_or_default()
14922    }
14923}
14924impl Default for PARAM_EXT_REQUEST_LIST_DATA {
14925    fn default() -> Self {
14926        Self::DEFAULT.clone()
14927    }
14928}
14929impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
14930    type Message = MavMessage;
14931    const ID: u32 = 321u32;
14932    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
14933    const EXTRA_CRC: u8 = 88u8;
14934    const ENCODED_LEN: usize = 2usize;
14935    fn deser(
14936        _version: MavlinkVersion,
14937        __input: &[u8],
14938    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14939        let avail_len = __input.len();
14940        let mut payload_buf = [0; Self::ENCODED_LEN];
14941        let mut buf = if avail_len < Self::ENCODED_LEN {
14942            payload_buf[0..avail_len].copy_from_slice(__input);
14943            Bytes::new(&payload_buf)
14944        } else {
14945            Bytes::new(__input)
14946        };
14947        let mut __struct = Self::default();
14948        __struct.target_system = buf.get_u8();
14949        __struct.target_component = buf.get_u8();
14950        Ok(__struct)
14951    }
14952    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14953        let mut __tmp = BytesMut::new(bytes);
14954        #[allow(clippy::absurd_extreme_comparisons)]
14955        #[allow(unused_comparisons)]
14956        if __tmp.remaining() < Self::ENCODED_LEN {
14957            panic!(
14958                "buffer is too small (need {} bytes, but got {})",
14959                Self::ENCODED_LEN,
14960                __tmp.remaining(),
14961            )
14962        }
14963        __tmp.put_u8(self.target_system);
14964        __tmp.put_u8(self.target_component);
14965        if matches!(version, MavlinkVersion::V2) {
14966            let len = __tmp.len();
14967            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14968        } else {
14969            __tmp.len()
14970        }
14971    }
14972}
14973#[doc = "id: 385"]
14974#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
14975#[derive(Debug, Clone, PartialEq)]
14976#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14977#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14978pub struct TUNNEL_DATA {
14979    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
14980    pub payload_type: MavTunnelPayloadType,
14981    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
14982    pub target_system: u8,
14983    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
14984    pub target_component: u8,
14985    #[doc = "Length of the data transported in payload"]
14986    pub payload_length: u8,
14987    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
14988    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14989    pub payload: [u8; 128],
14990}
14991impl TUNNEL_DATA {
14992    pub const ENCODED_LEN: usize = 133usize;
14993    pub const DEFAULT: Self = Self {
14994        payload_type: MavTunnelPayloadType::DEFAULT,
14995        target_system: 0_u8,
14996        target_component: 0_u8,
14997        payload_length: 0_u8,
14998        payload: [0_u8; 128usize],
14999    };
15000    #[cfg(feature = "arbitrary")]
15001    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15002        use arbitrary::{Arbitrary, Unstructured};
15003        let mut buf = [0u8; 1024];
15004        rng.fill_bytes(&mut buf);
15005        let mut unstructured = Unstructured::new(&buf);
15006        Self::arbitrary(&mut unstructured).unwrap_or_default()
15007    }
15008}
15009impl Default for TUNNEL_DATA {
15010    fn default() -> Self {
15011        Self::DEFAULT.clone()
15012    }
15013}
15014impl MessageData for TUNNEL_DATA {
15015    type Message = MavMessage;
15016    const ID: u32 = 385u32;
15017    const NAME: &'static str = "TUNNEL";
15018    const EXTRA_CRC: u8 = 147u8;
15019    const ENCODED_LEN: usize = 133usize;
15020    fn deser(
15021        _version: MavlinkVersion,
15022        __input: &[u8],
15023    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15024        let avail_len = __input.len();
15025        let mut payload_buf = [0; Self::ENCODED_LEN];
15026        let mut buf = if avail_len < Self::ENCODED_LEN {
15027            payload_buf[0..avail_len].copy_from_slice(__input);
15028            Bytes::new(&payload_buf)
15029        } else {
15030            Bytes::new(__input)
15031        };
15032        let mut __struct = Self::default();
15033        let tmp = buf.get_u16_le();
15034        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
15035            ::mavlink_core::error::ParserError::InvalidEnum {
15036                enum_type: "MavTunnelPayloadType",
15037                value: tmp as u32,
15038            },
15039        )?;
15040        __struct.target_system = buf.get_u8();
15041        __struct.target_component = buf.get_u8();
15042        __struct.payload_length = buf.get_u8();
15043        for v in &mut __struct.payload {
15044            let val = buf.get_u8();
15045            *v = val;
15046        }
15047        Ok(__struct)
15048    }
15049    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15050        let mut __tmp = BytesMut::new(bytes);
15051        #[allow(clippy::absurd_extreme_comparisons)]
15052        #[allow(unused_comparisons)]
15053        if __tmp.remaining() < Self::ENCODED_LEN {
15054            panic!(
15055                "buffer is too small (need {} bytes, but got {})",
15056                Self::ENCODED_LEN,
15057                __tmp.remaining(),
15058            )
15059        }
15060        __tmp.put_u16_le(self.payload_type as u16);
15061        __tmp.put_u8(self.target_system);
15062        __tmp.put_u8(self.target_component);
15063        __tmp.put_u8(self.payload_length);
15064        for val in &self.payload {
15065            __tmp.put_u8(*val);
15066        }
15067        if matches!(version, MavlinkVersion::V2) {
15068            let len = __tmp.len();
15069            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15070        } else {
15071            __tmp.len()
15072        }
15073    }
15074}
15075#[doc = "id: 76"]
15076#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
15077#[derive(Debug, Clone, PartialEq)]
15078#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15079#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15080pub struct COMMAND_LONG_DATA {
15081    #[doc = "Parameter 1 (for the specific command)."]
15082    pub param1: f32,
15083    #[doc = "Parameter 2 (for the specific command)."]
15084    pub param2: f32,
15085    #[doc = "Parameter 3 (for the specific command)."]
15086    pub param3: f32,
15087    #[doc = "Parameter 4 (for the specific command)."]
15088    pub param4: f32,
15089    #[doc = "Parameter 5 (for the specific command)."]
15090    pub param5: f32,
15091    #[doc = "Parameter 6 (for the specific command)."]
15092    pub param6: f32,
15093    #[doc = "Parameter 7 (for the specific command)."]
15094    pub param7: f32,
15095    #[doc = "Command ID (of command to send)."]
15096    pub command: MavCmd,
15097    #[doc = "System which should execute the command"]
15098    pub target_system: u8,
15099    #[doc = "Component which should execute the command, 0 for all components"]
15100    pub target_component: u8,
15101    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
15102    pub confirmation: u8,
15103}
15104impl COMMAND_LONG_DATA {
15105    pub const ENCODED_LEN: usize = 33usize;
15106    pub const DEFAULT: Self = Self {
15107        param1: 0.0_f32,
15108        param2: 0.0_f32,
15109        param3: 0.0_f32,
15110        param4: 0.0_f32,
15111        param5: 0.0_f32,
15112        param6: 0.0_f32,
15113        param7: 0.0_f32,
15114        command: MavCmd::DEFAULT,
15115        target_system: 0_u8,
15116        target_component: 0_u8,
15117        confirmation: 0_u8,
15118    };
15119    #[cfg(feature = "arbitrary")]
15120    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15121        use arbitrary::{Arbitrary, Unstructured};
15122        let mut buf = [0u8; 1024];
15123        rng.fill_bytes(&mut buf);
15124        let mut unstructured = Unstructured::new(&buf);
15125        Self::arbitrary(&mut unstructured).unwrap_or_default()
15126    }
15127}
15128impl Default for COMMAND_LONG_DATA {
15129    fn default() -> Self {
15130        Self::DEFAULT.clone()
15131    }
15132}
15133impl MessageData for COMMAND_LONG_DATA {
15134    type Message = MavMessage;
15135    const ID: u32 = 76u32;
15136    const NAME: &'static str = "COMMAND_LONG";
15137    const EXTRA_CRC: u8 = 152u8;
15138    const ENCODED_LEN: usize = 33usize;
15139    fn deser(
15140        _version: MavlinkVersion,
15141        __input: &[u8],
15142    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15143        let avail_len = __input.len();
15144        let mut payload_buf = [0; Self::ENCODED_LEN];
15145        let mut buf = if avail_len < Self::ENCODED_LEN {
15146            payload_buf[0..avail_len].copy_from_slice(__input);
15147            Bytes::new(&payload_buf)
15148        } else {
15149            Bytes::new(__input)
15150        };
15151        let mut __struct = Self::default();
15152        __struct.param1 = buf.get_f32_le();
15153        __struct.param2 = buf.get_f32_le();
15154        __struct.param3 = buf.get_f32_le();
15155        __struct.param4 = buf.get_f32_le();
15156        __struct.param5 = buf.get_f32_le();
15157        __struct.param6 = buf.get_f32_le();
15158        __struct.param7 = buf.get_f32_le();
15159        let tmp = buf.get_u16_le();
15160        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
15161            ::mavlink_core::error::ParserError::InvalidEnum {
15162                enum_type: "MavCmd",
15163                value: tmp as u32,
15164            },
15165        )?;
15166        __struct.target_system = buf.get_u8();
15167        __struct.target_component = buf.get_u8();
15168        __struct.confirmation = buf.get_u8();
15169        Ok(__struct)
15170    }
15171    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15172        let mut __tmp = BytesMut::new(bytes);
15173        #[allow(clippy::absurd_extreme_comparisons)]
15174        #[allow(unused_comparisons)]
15175        if __tmp.remaining() < Self::ENCODED_LEN {
15176            panic!(
15177                "buffer is too small (need {} bytes, but got {})",
15178                Self::ENCODED_LEN,
15179                __tmp.remaining(),
15180            )
15181        }
15182        __tmp.put_f32_le(self.param1);
15183        __tmp.put_f32_le(self.param2);
15184        __tmp.put_f32_le(self.param3);
15185        __tmp.put_f32_le(self.param4);
15186        __tmp.put_f32_le(self.param5);
15187        __tmp.put_f32_le(self.param6);
15188        __tmp.put_f32_le(self.param7);
15189        __tmp.put_u16_le(self.command as u16);
15190        __tmp.put_u8(self.target_system);
15191        __tmp.put_u8(self.target_component);
15192        __tmp.put_u8(self.confirmation);
15193        if matches!(version, MavlinkVersion::V2) {
15194            let len = __tmp.len();
15195            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15196        } else {
15197            __tmp.len()
15198        }
15199    }
15200}
15201#[doc = "id: 12903"]
15202#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
15203#[derive(Debug, Clone, PartialEq)]
15204#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15205#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15206pub struct OPEN_DRONE_ID_SELF_ID_DATA {
15207    #[doc = "System ID (0 for broadcast)."]
15208    pub target_system: u8,
15209    #[doc = "Component ID (0 for broadcast)."]
15210    pub target_component: u8,
15211    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
15212    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15213    pub id_or_mac: [u8; 20],
15214    #[doc = "Indicates the type of the description field."]
15215    pub description_type: MavOdidDescType,
15216    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
15217    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15218    pub description: [u8; 23],
15219}
15220impl OPEN_DRONE_ID_SELF_ID_DATA {
15221    pub const ENCODED_LEN: usize = 46usize;
15222    pub const DEFAULT: Self = Self {
15223        target_system: 0_u8,
15224        target_component: 0_u8,
15225        id_or_mac: [0_u8; 20usize],
15226        description_type: MavOdidDescType::DEFAULT,
15227        description: [0_u8; 23usize],
15228    };
15229    #[cfg(feature = "arbitrary")]
15230    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15231        use arbitrary::{Arbitrary, Unstructured};
15232        let mut buf = [0u8; 1024];
15233        rng.fill_bytes(&mut buf);
15234        let mut unstructured = Unstructured::new(&buf);
15235        Self::arbitrary(&mut unstructured).unwrap_or_default()
15236    }
15237}
15238impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
15239    fn default() -> Self {
15240        Self::DEFAULT.clone()
15241    }
15242}
15243impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
15244    type Message = MavMessage;
15245    const ID: u32 = 12903u32;
15246    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
15247    const EXTRA_CRC: u8 = 249u8;
15248    const ENCODED_LEN: usize = 46usize;
15249    fn deser(
15250        _version: MavlinkVersion,
15251        __input: &[u8],
15252    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15253        let avail_len = __input.len();
15254        let mut payload_buf = [0; Self::ENCODED_LEN];
15255        let mut buf = if avail_len < Self::ENCODED_LEN {
15256            payload_buf[0..avail_len].copy_from_slice(__input);
15257            Bytes::new(&payload_buf)
15258        } else {
15259            Bytes::new(__input)
15260        };
15261        let mut __struct = Self::default();
15262        __struct.target_system = buf.get_u8();
15263        __struct.target_component = buf.get_u8();
15264        for v in &mut __struct.id_or_mac {
15265            let val = buf.get_u8();
15266            *v = val;
15267        }
15268        let tmp = buf.get_u8();
15269        __struct.description_type =
15270            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15271                enum_type: "MavOdidDescType",
15272                value: tmp as u32,
15273            })?;
15274        for v in &mut __struct.description {
15275            let val = buf.get_u8();
15276            *v = val;
15277        }
15278        Ok(__struct)
15279    }
15280    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15281        let mut __tmp = BytesMut::new(bytes);
15282        #[allow(clippy::absurd_extreme_comparisons)]
15283        #[allow(unused_comparisons)]
15284        if __tmp.remaining() < Self::ENCODED_LEN {
15285            panic!(
15286                "buffer is too small (need {} bytes, but got {})",
15287                Self::ENCODED_LEN,
15288                __tmp.remaining(),
15289            )
15290        }
15291        __tmp.put_u8(self.target_system);
15292        __tmp.put_u8(self.target_component);
15293        for val in &self.id_or_mac {
15294            __tmp.put_u8(*val);
15295        }
15296        __tmp.put_u8(self.description_type as u8);
15297        for val in &self.description {
15298            __tmp.put_u8(*val);
15299        }
15300        if matches!(version, MavlinkVersion::V2) {
15301            let len = __tmp.len();
15302            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15303        } else {
15304            __tmp.len()
15305        }
15306    }
15307}
15308#[doc = "id: 74"]
15309#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
15310#[derive(Debug, Clone, PartialEq)]
15311#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15312#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15313pub struct VFR_HUD_DATA {
15314    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
15315    pub airspeed: f32,
15316    #[doc = "Current ground speed."]
15317    pub groundspeed: f32,
15318    #[doc = "Current altitude (MSL)."]
15319    pub alt: f32,
15320    #[doc = "Current climb rate."]
15321    pub climb: f32,
15322    #[doc = "Current heading in compass units (0-360, 0=north)."]
15323    pub heading: i16,
15324    #[doc = "Current throttle setting (0 to 100)."]
15325    pub throttle: u16,
15326}
15327impl VFR_HUD_DATA {
15328    pub const ENCODED_LEN: usize = 20usize;
15329    pub const DEFAULT: Self = Self {
15330        airspeed: 0.0_f32,
15331        groundspeed: 0.0_f32,
15332        alt: 0.0_f32,
15333        climb: 0.0_f32,
15334        heading: 0_i16,
15335        throttle: 0_u16,
15336    };
15337    #[cfg(feature = "arbitrary")]
15338    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15339        use arbitrary::{Arbitrary, Unstructured};
15340        let mut buf = [0u8; 1024];
15341        rng.fill_bytes(&mut buf);
15342        let mut unstructured = Unstructured::new(&buf);
15343        Self::arbitrary(&mut unstructured).unwrap_or_default()
15344    }
15345}
15346impl Default for VFR_HUD_DATA {
15347    fn default() -> Self {
15348        Self::DEFAULT.clone()
15349    }
15350}
15351impl MessageData for VFR_HUD_DATA {
15352    type Message = MavMessage;
15353    const ID: u32 = 74u32;
15354    const NAME: &'static str = "VFR_HUD";
15355    const EXTRA_CRC: u8 = 20u8;
15356    const ENCODED_LEN: usize = 20usize;
15357    fn deser(
15358        _version: MavlinkVersion,
15359        __input: &[u8],
15360    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15361        let avail_len = __input.len();
15362        let mut payload_buf = [0; Self::ENCODED_LEN];
15363        let mut buf = if avail_len < Self::ENCODED_LEN {
15364            payload_buf[0..avail_len].copy_from_slice(__input);
15365            Bytes::new(&payload_buf)
15366        } else {
15367            Bytes::new(__input)
15368        };
15369        let mut __struct = Self::default();
15370        __struct.airspeed = buf.get_f32_le();
15371        __struct.groundspeed = buf.get_f32_le();
15372        __struct.alt = buf.get_f32_le();
15373        __struct.climb = buf.get_f32_le();
15374        __struct.heading = buf.get_i16_le();
15375        __struct.throttle = buf.get_u16_le();
15376        Ok(__struct)
15377    }
15378    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15379        let mut __tmp = BytesMut::new(bytes);
15380        #[allow(clippy::absurd_extreme_comparisons)]
15381        #[allow(unused_comparisons)]
15382        if __tmp.remaining() < Self::ENCODED_LEN {
15383            panic!(
15384                "buffer is too small (need {} bytes, but got {})",
15385                Self::ENCODED_LEN,
15386                __tmp.remaining(),
15387            )
15388        }
15389        __tmp.put_f32_le(self.airspeed);
15390        __tmp.put_f32_le(self.groundspeed);
15391        __tmp.put_f32_le(self.alt);
15392        __tmp.put_f32_le(self.climb);
15393        __tmp.put_i16_le(self.heading);
15394        __tmp.put_u16_le(self.throttle);
15395        if matches!(version, MavlinkVersion::V2) {
15396            let len = __tmp.len();
15397            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15398        } else {
15399            __tmp.len()
15400        }
15401    }
15402}
15403#[doc = "id: 50"]
15404#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
15405#[derive(Debug, Clone, PartialEq)]
15406#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15407#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15408pub struct PARAM_MAP_RC_DATA {
15409    #[doc = "Initial parameter value"]
15410    pub param_value0: f32,
15411    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
15412    pub scale: f32,
15413    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
15414    pub param_value_min: f32,
15415    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
15416    pub param_value_max: f32,
15417    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
15418    pub param_index: i16,
15419    #[doc = "System ID"]
15420    pub target_system: u8,
15421    #[doc = "Component ID"]
15422    pub target_component: u8,
15423    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
15424    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15425    pub param_id: [u8; 16],
15426    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
15427    pub parameter_rc_channel_index: u8,
15428}
15429impl PARAM_MAP_RC_DATA {
15430    pub const ENCODED_LEN: usize = 37usize;
15431    pub const DEFAULT: Self = Self {
15432        param_value0: 0.0_f32,
15433        scale: 0.0_f32,
15434        param_value_min: 0.0_f32,
15435        param_value_max: 0.0_f32,
15436        param_index: 0_i16,
15437        target_system: 0_u8,
15438        target_component: 0_u8,
15439        param_id: [0_u8; 16usize],
15440        parameter_rc_channel_index: 0_u8,
15441    };
15442    #[cfg(feature = "arbitrary")]
15443    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15444        use arbitrary::{Arbitrary, Unstructured};
15445        let mut buf = [0u8; 1024];
15446        rng.fill_bytes(&mut buf);
15447        let mut unstructured = Unstructured::new(&buf);
15448        Self::arbitrary(&mut unstructured).unwrap_or_default()
15449    }
15450}
15451impl Default for PARAM_MAP_RC_DATA {
15452    fn default() -> Self {
15453        Self::DEFAULT.clone()
15454    }
15455}
15456impl MessageData for PARAM_MAP_RC_DATA {
15457    type Message = MavMessage;
15458    const ID: u32 = 50u32;
15459    const NAME: &'static str = "PARAM_MAP_RC";
15460    const EXTRA_CRC: u8 = 78u8;
15461    const ENCODED_LEN: usize = 37usize;
15462    fn deser(
15463        _version: MavlinkVersion,
15464        __input: &[u8],
15465    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15466        let avail_len = __input.len();
15467        let mut payload_buf = [0; Self::ENCODED_LEN];
15468        let mut buf = if avail_len < Self::ENCODED_LEN {
15469            payload_buf[0..avail_len].copy_from_slice(__input);
15470            Bytes::new(&payload_buf)
15471        } else {
15472            Bytes::new(__input)
15473        };
15474        let mut __struct = Self::default();
15475        __struct.param_value0 = buf.get_f32_le();
15476        __struct.scale = buf.get_f32_le();
15477        __struct.param_value_min = buf.get_f32_le();
15478        __struct.param_value_max = buf.get_f32_le();
15479        __struct.param_index = buf.get_i16_le();
15480        __struct.target_system = buf.get_u8();
15481        __struct.target_component = buf.get_u8();
15482        for v in &mut __struct.param_id {
15483            let val = buf.get_u8();
15484            *v = val;
15485        }
15486        __struct.parameter_rc_channel_index = buf.get_u8();
15487        Ok(__struct)
15488    }
15489    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15490        let mut __tmp = BytesMut::new(bytes);
15491        #[allow(clippy::absurd_extreme_comparisons)]
15492        #[allow(unused_comparisons)]
15493        if __tmp.remaining() < Self::ENCODED_LEN {
15494            panic!(
15495                "buffer is too small (need {} bytes, but got {})",
15496                Self::ENCODED_LEN,
15497                __tmp.remaining(),
15498            )
15499        }
15500        __tmp.put_f32_le(self.param_value0);
15501        __tmp.put_f32_le(self.scale);
15502        __tmp.put_f32_le(self.param_value_min);
15503        __tmp.put_f32_le(self.param_value_max);
15504        __tmp.put_i16_le(self.param_index);
15505        __tmp.put_u8(self.target_system);
15506        __tmp.put_u8(self.target_component);
15507        for val in &self.param_id {
15508            __tmp.put_u8(*val);
15509        }
15510        __tmp.put_u8(self.parameter_rc_channel_index);
15511        if matches!(version, MavlinkVersion::V2) {
15512            let len = __tmp.len();
15513            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15514        } else {
15515            __tmp.len()
15516        }
15517    }
15518}
15519#[doc = "id: 62"]
15520#[doc = "The state of the navigation and position controller."]
15521#[derive(Debug, Clone, PartialEq)]
15522#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15523#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15524pub struct NAV_CONTROLLER_OUTPUT_DATA {
15525    #[doc = "Current desired roll"]
15526    pub nav_roll: f32,
15527    #[doc = "Current desired pitch"]
15528    pub nav_pitch: f32,
15529    #[doc = "Current altitude error"]
15530    pub alt_error: f32,
15531    #[doc = "Current airspeed error"]
15532    pub aspd_error: f32,
15533    #[doc = "Current crosstrack error on x-y plane"]
15534    pub xtrack_error: f32,
15535    #[doc = "Current desired heading"]
15536    pub nav_bearing: i16,
15537    #[doc = "Bearing to current waypoint/target"]
15538    pub target_bearing: i16,
15539    #[doc = "Distance to active waypoint"]
15540    pub wp_dist: u16,
15541}
15542impl NAV_CONTROLLER_OUTPUT_DATA {
15543    pub const ENCODED_LEN: usize = 26usize;
15544    pub const DEFAULT: Self = Self {
15545        nav_roll: 0.0_f32,
15546        nav_pitch: 0.0_f32,
15547        alt_error: 0.0_f32,
15548        aspd_error: 0.0_f32,
15549        xtrack_error: 0.0_f32,
15550        nav_bearing: 0_i16,
15551        target_bearing: 0_i16,
15552        wp_dist: 0_u16,
15553    };
15554    #[cfg(feature = "arbitrary")]
15555    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15556        use arbitrary::{Arbitrary, Unstructured};
15557        let mut buf = [0u8; 1024];
15558        rng.fill_bytes(&mut buf);
15559        let mut unstructured = Unstructured::new(&buf);
15560        Self::arbitrary(&mut unstructured).unwrap_or_default()
15561    }
15562}
15563impl Default for NAV_CONTROLLER_OUTPUT_DATA {
15564    fn default() -> Self {
15565        Self::DEFAULT.clone()
15566    }
15567}
15568impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
15569    type Message = MavMessage;
15570    const ID: u32 = 62u32;
15571    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
15572    const EXTRA_CRC: u8 = 183u8;
15573    const ENCODED_LEN: usize = 26usize;
15574    fn deser(
15575        _version: MavlinkVersion,
15576        __input: &[u8],
15577    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15578        let avail_len = __input.len();
15579        let mut payload_buf = [0; Self::ENCODED_LEN];
15580        let mut buf = if avail_len < Self::ENCODED_LEN {
15581            payload_buf[0..avail_len].copy_from_slice(__input);
15582            Bytes::new(&payload_buf)
15583        } else {
15584            Bytes::new(__input)
15585        };
15586        let mut __struct = Self::default();
15587        __struct.nav_roll = buf.get_f32_le();
15588        __struct.nav_pitch = buf.get_f32_le();
15589        __struct.alt_error = buf.get_f32_le();
15590        __struct.aspd_error = buf.get_f32_le();
15591        __struct.xtrack_error = buf.get_f32_le();
15592        __struct.nav_bearing = buf.get_i16_le();
15593        __struct.target_bearing = buf.get_i16_le();
15594        __struct.wp_dist = buf.get_u16_le();
15595        Ok(__struct)
15596    }
15597    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15598        let mut __tmp = BytesMut::new(bytes);
15599        #[allow(clippy::absurd_extreme_comparisons)]
15600        #[allow(unused_comparisons)]
15601        if __tmp.remaining() < Self::ENCODED_LEN {
15602            panic!(
15603                "buffer is too small (need {} bytes, but got {})",
15604                Self::ENCODED_LEN,
15605                __tmp.remaining(),
15606            )
15607        }
15608        __tmp.put_f32_le(self.nav_roll);
15609        __tmp.put_f32_le(self.nav_pitch);
15610        __tmp.put_f32_le(self.alt_error);
15611        __tmp.put_f32_le(self.aspd_error);
15612        __tmp.put_f32_le(self.xtrack_error);
15613        __tmp.put_i16_le(self.nav_bearing);
15614        __tmp.put_i16_le(self.target_bearing);
15615        __tmp.put_u16_le(self.wp_dist);
15616        if matches!(version, MavlinkVersion::V2) {
15617            let len = __tmp.len();
15618            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15619        } else {
15620            __tmp.len()
15621        }
15622    }
15623}
15624#[doc = "id: 335"]
15625#[doc = "Status of the Iridium SBD link."]
15626#[derive(Debug, Clone, PartialEq)]
15627#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15628#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15629pub struct ISBD_LINK_STATUS_DATA {
15630    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15631    pub timestamp: u64,
15632    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15633    pub last_heartbeat: u64,
15634    #[doc = "Number of failed SBD sessions."]
15635    pub failed_sessions: u16,
15636    #[doc = "Number of successful SBD sessions."]
15637    pub successful_sessions: u16,
15638    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
15639    pub signal_quality: u8,
15640    #[doc = "1: Ring call pending, 0: No call pending."]
15641    pub ring_pending: u8,
15642    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
15643    pub tx_session_pending: u8,
15644    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
15645    pub rx_session_pending: u8,
15646}
15647impl ISBD_LINK_STATUS_DATA {
15648    pub const ENCODED_LEN: usize = 24usize;
15649    pub const DEFAULT: Self = Self {
15650        timestamp: 0_u64,
15651        last_heartbeat: 0_u64,
15652        failed_sessions: 0_u16,
15653        successful_sessions: 0_u16,
15654        signal_quality: 0_u8,
15655        ring_pending: 0_u8,
15656        tx_session_pending: 0_u8,
15657        rx_session_pending: 0_u8,
15658    };
15659    #[cfg(feature = "arbitrary")]
15660    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15661        use arbitrary::{Arbitrary, Unstructured};
15662        let mut buf = [0u8; 1024];
15663        rng.fill_bytes(&mut buf);
15664        let mut unstructured = Unstructured::new(&buf);
15665        Self::arbitrary(&mut unstructured).unwrap_or_default()
15666    }
15667}
15668impl Default for ISBD_LINK_STATUS_DATA {
15669    fn default() -> Self {
15670        Self::DEFAULT.clone()
15671    }
15672}
15673impl MessageData for ISBD_LINK_STATUS_DATA {
15674    type Message = MavMessage;
15675    const ID: u32 = 335u32;
15676    const NAME: &'static str = "ISBD_LINK_STATUS";
15677    const EXTRA_CRC: u8 = 225u8;
15678    const ENCODED_LEN: usize = 24usize;
15679    fn deser(
15680        _version: MavlinkVersion,
15681        __input: &[u8],
15682    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15683        let avail_len = __input.len();
15684        let mut payload_buf = [0; Self::ENCODED_LEN];
15685        let mut buf = if avail_len < Self::ENCODED_LEN {
15686            payload_buf[0..avail_len].copy_from_slice(__input);
15687            Bytes::new(&payload_buf)
15688        } else {
15689            Bytes::new(__input)
15690        };
15691        let mut __struct = Self::default();
15692        __struct.timestamp = buf.get_u64_le();
15693        __struct.last_heartbeat = buf.get_u64_le();
15694        __struct.failed_sessions = buf.get_u16_le();
15695        __struct.successful_sessions = buf.get_u16_le();
15696        __struct.signal_quality = buf.get_u8();
15697        __struct.ring_pending = buf.get_u8();
15698        __struct.tx_session_pending = buf.get_u8();
15699        __struct.rx_session_pending = buf.get_u8();
15700        Ok(__struct)
15701    }
15702    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15703        let mut __tmp = BytesMut::new(bytes);
15704        #[allow(clippy::absurd_extreme_comparisons)]
15705        #[allow(unused_comparisons)]
15706        if __tmp.remaining() < Self::ENCODED_LEN {
15707            panic!(
15708                "buffer is too small (need {} bytes, but got {})",
15709                Self::ENCODED_LEN,
15710                __tmp.remaining(),
15711            )
15712        }
15713        __tmp.put_u64_le(self.timestamp);
15714        __tmp.put_u64_le(self.last_heartbeat);
15715        __tmp.put_u16_le(self.failed_sessions);
15716        __tmp.put_u16_le(self.successful_sessions);
15717        __tmp.put_u8(self.signal_quality);
15718        __tmp.put_u8(self.ring_pending);
15719        __tmp.put_u8(self.tx_session_pending);
15720        __tmp.put_u8(self.rx_session_pending);
15721        if matches!(version, MavlinkVersion::V2) {
15722            let len = __tmp.len();
15723            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15724        } else {
15725            __tmp.len()
15726        }
15727    }
15728}
15729#[doc = "id: 123"]
15730#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
15731#[derive(Debug, Clone, PartialEq)]
15732#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15733#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15734pub struct GPS_INJECT_DATA_DATA {
15735    #[doc = "System ID"]
15736    pub target_system: u8,
15737    #[doc = "Component ID"]
15738    pub target_component: u8,
15739    #[doc = "Data length"]
15740    pub len: u8,
15741    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
15742    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15743    pub data: [u8; 110],
15744}
15745impl GPS_INJECT_DATA_DATA {
15746    pub const ENCODED_LEN: usize = 113usize;
15747    pub const DEFAULT: Self = Self {
15748        target_system: 0_u8,
15749        target_component: 0_u8,
15750        len: 0_u8,
15751        data: [0_u8; 110usize],
15752    };
15753    #[cfg(feature = "arbitrary")]
15754    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15755        use arbitrary::{Arbitrary, Unstructured};
15756        let mut buf = [0u8; 1024];
15757        rng.fill_bytes(&mut buf);
15758        let mut unstructured = Unstructured::new(&buf);
15759        Self::arbitrary(&mut unstructured).unwrap_or_default()
15760    }
15761}
15762impl Default for GPS_INJECT_DATA_DATA {
15763    fn default() -> Self {
15764        Self::DEFAULT.clone()
15765    }
15766}
15767impl MessageData for GPS_INJECT_DATA_DATA {
15768    type Message = MavMessage;
15769    const ID: u32 = 123u32;
15770    const NAME: &'static str = "GPS_INJECT_DATA";
15771    const EXTRA_CRC: u8 = 250u8;
15772    const ENCODED_LEN: usize = 113usize;
15773    fn deser(
15774        _version: MavlinkVersion,
15775        __input: &[u8],
15776    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15777        let avail_len = __input.len();
15778        let mut payload_buf = [0; Self::ENCODED_LEN];
15779        let mut buf = if avail_len < Self::ENCODED_LEN {
15780            payload_buf[0..avail_len].copy_from_slice(__input);
15781            Bytes::new(&payload_buf)
15782        } else {
15783            Bytes::new(__input)
15784        };
15785        let mut __struct = Self::default();
15786        __struct.target_system = buf.get_u8();
15787        __struct.target_component = buf.get_u8();
15788        __struct.len = buf.get_u8();
15789        for v in &mut __struct.data {
15790            let val = buf.get_u8();
15791            *v = val;
15792        }
15793        Ok(__struct)
15794    }
15795    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15796        let mut __tmp = BytesMut::new(bytes);
15797        #[allow(clippy::absurd_extreme_comparisons)]
15798        #[allow(unused_comparisons)]
15799        if __tmp.remaining() < Self::ENCODED_LEN {
15800            panic!(
15801                "buffer is too small (need {} bytes, but got {})",
15802                Self::ENCODED_LEN,
15803                __tmp.remaining(),
15804            )
15805        }
15806        __tmp.put_u8(self.target_system);
15807        __tmp.put_u8(self.target_component);
15808        __tmp.put_u8(self.len);
15809        for val in &self.data {
15810            __tmp.put_u8(*val);
15811        }
15812        if matches!(version, MavlinkVersion::V2) {
15813            let len = __tmp.len();
15814            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15815        } else {
15816            __tmp.len()
15817        }
15818    }
15819}
15820#[doc = "id: 263"]
15821#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
15822#[derive(Debug, Clone, PartialEq)]
15823#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15824#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15825pub struct CAMERA_IMAGE_CAPTURED_DATA {
15826    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
15827    pub time_utc: u64,
15828    #[doc = "Timestamp (time since system boot)."]
15829    pub time_boot_ms: u32,
15830    #[doc = "Latitude where image was taken"]
15831    pub lat: i32,
15832    #[doc = "Longitude where capture was taken"]
15833    pub lon: i32,
15834    #[doc = "Altitude (MSL) where image was taken"]
15835    pub alt: i32,
15836    #[doc = "Altitude above ground"]
15837    pub relative_alt: i32,
15838    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
15839    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15840    pub q: [f32; 4],
15841    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
15842    pub image_index: i32,
15843    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
15844    pub camera_id: u8,
15845    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
15846    pub capture_result: i8,
15847    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
15848    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15849    pub file_url: [u8; 205],
15850}
15851impl CAMERA_IMAGE_CAPTURED_DATA {
15852    pub const ENCODED_LEN: usize = 255usize;
15853    pub const DEFAULT: Self = Self {
15854        time_utc: 0_u64,
15855        time_boot_ms: 0_u32,
15856        lat: 0_i32,
15857        lon: 0_i32,
15858        alt: 0_i32,
15859        relative_alt: 0_i32,
15860        q: [0.0_f32; 4usize],
15861        image_index: 0_i32,
15862        camera_id: 0_u8,
15863        capture_result: 0_i8,
15864        file_url: [0_u8; 205usize],
15865    };
15866    #[cfg(feature = "arbitrary")]
15867    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15868        use arbitrary::{Arbitrary, Unstructured};
15869        let mut buf = [0u8; 1024];
15870        rng.fill_bytes(&mut buf);
15871        let mut unstructured = Unstructured::new(&buf);
15872        Self::arbitrary(&mut unstructured).unwrap_or_default()
15873    }
15874}
15875impl Default for CAMERA_IMAGE_CAPTURED_DATA {
15876    fn default() -> Self {
15877        Self::DEFAULT.clone()
15878    }
15879}
15880impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
15881    type Message = MavMessage;
15882    const ID: u32 = 263u32;
15883    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
15884    const EXTRA_CRC: u8 = 133u8;
15885    const ENCODED_LEN: usize = 255usize;
15886    fn deser(
15887        _version: MavlinkVersion,
15888        __input: &[u8],
15889    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15890        let avail_len = __input.len();
15891        let mut payload_buf = [0; Self::ENCODED_LEN];
15892        let mut buf = if avail_len < Self::ENCODED_LEN {
15893            payload_buf[0..avail_len].copy_from_slice(__input);
15894            Bytes::new(&payload_buf)
15895        } else {
15896            Bytes::new(__input)
15897        };
15898        let mut __struct = Self::default();
15899        __struct.time_utc = buf.get_u64_le();
15900        __struct.time_boot_ms = buf.get_u32_le();
15901        __struct.lat = buf.get_i32_le();
15902        __struct.lon = buf.get_i32_le();
15903        __struct.alt = buf.get_i32_le();
15904        __struct.relative_alt = buf.get_i32_le();
15905        for v in &mut __struct.q {
15906            let val = buf.get_f32_le();
15907            *v = val;
15908        }
15909        __struct.image_index = buf.get_i32_le();
15910        __struct.camera_id = buf.get_u8();
15911        __struct.capture_result = buf.get_i8();
15912        for v in &mut __struct.file_url {
15913            let val = buf.get_u8();
15914            *v = val;
15915        }
15916        Ok(__struct)
15917    }
15918    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15919        let mut __tmp = BytesMut::new(bytes);
15920        #[allow(clippy::absurd_extreme_comparisons)]
15921        #[allow(unused_comparisons)]
15922        if __tmp.remaining() < Self::ENCODED_LEN {
15923            panic!(
15924                "buffer is too small (need {} bytes, but got {})",
15925                Self::ENCODED_LEN,
15926                __tmp.remaining(),
15927            )
15928        }
15929        __tmp.put_u64_le(self.time_utc);
15930        __tmp.put_u32_le(self.time_boot_ms);
15931        __tmp.put_i32_le(self.lat);
15932        __tmp.put_i32_le(self.lon);
15933        __tmp.put_i32_le(self.alt);
15934        __tmp.put_i32_le(self.relative_alt);
15935        for val in &self.q {
15936            __tmp.put_f32_le(*val);
15937        }
15938        __tmp.put_i32_le(self.image_index);
15939        __tmp.put_u8(self.camera_id);
15940        __tmp.put_i8(self.capture_result);
15941        for val in &self.file_url {
15942            __tmp.put_u8(*val);
15943        }
15944        if matches!(version, MavlinkVersion::V2) {
15945            let len = __tmp.len();
15946            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15947        } else {
15948            __tmp.len()
15949        }
15950    }
15951}
15952#[doc = "id: 85"]
15953#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
15954#[derive(Debug, Clone, PartialEq)]
15955#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15956#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15957pub struct POSITION_TARGET_LOCAL_NED_DATA {
15958    #[doc = "Timestamp (time since system boot)."]
15959    pub time_boot_ms: u32,
15960    #[doc = "X Position in NED frame"]
15961    pub x: f32,
15962    #[doc = "Y Position in NED frame"]
15963    pub y: f32,
15964    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
15965    pub z: f32,
15966    #[doc = "X velocity in NED frame"]
15967    pub vx: f32,
15968    #[doc = "Y velocity in NED frame"]
15969    pub vy: f32,
15970    #[doc = "Z velocity in NED frame"]
15971    pub vz: f32,
15972    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
15973    pub afx: f32,
15974    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
15975    pub afy: f32,
15976    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
15977    pub afz: f32,
15978    #[doc = "yaw setpoint"]
15979    pub yaw: f32,
15980    #[doc = "yaw rate setpoint"]
15981    pub yaw_rate: f32,
15982    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
15983    pub type_mask: PositionTargetTypemask,
15984    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
15985    pub coordinate_frame: MavFrame,
15986}
15987impl POSITION_TARGET_LOCAL_NED_DATA {
15988    pub const ENCODED_LEN: usize = 51usize;
15989    pub const DEFAULT: Self = Self {
15990        time_boot_ms: 0_u32,
15991        x: 0.0_f32,
15992        y: 0.0_f32,
15993        z: 0.0_f32,
15994        vx: 0.0_f32,
15995        vy: 0.0_f32,
15996        vz: 0.0_f32,
15997        afx: 0.0_f32,
15998        afy: 0.0_f32,
15999        afz: 0.0_f32,
16000        yaw: 0.0_f32,
16001        yaw_rate: 0.0_f32,
16002        type_mask: PositionTargetTypemask::DEFAULT,
16003        coordinate_frame: MavFrame::DEFAULT,
16004    };
16005    #[cfg(feature = "arbitrary")]
16006    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16007        use arbitrary::{Arbitrary, Unstructured};
16008        let mut buf = [0u8; 1024];
16009        rng.fill_bytes(&mut buf);
16010        let mut unstructured = Unstructured::new(&buf);
16011        Self::arbitrary(&mut unstructured).unwrap_or_default()
16012    }
16013}
16014impl Default for POSITION_TARGET_LOCAL_NED_DATA {
16015    fn default() -> Self {
16016        Self::DEFAULT.clone()
16017    }
16018}
16019impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
16020    type Message = MavMessage;
16021    const ID: u32 = 85u32;
16022    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
16023    const EXTRA_CRC: u8 = 140u8;
16024    const ENCODED_LEN: usize = 51usize;
16025    fn deser(
16026        _version: MavlinkVersion,
16027        __input: &[u8],
16028    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16029        let avail_len = __input.len();
16030        let mut payload_buf = [0; Self::ENCODED_LEN];
16031        let mut buf = if avail_len < Self::ENCODED_LEN {
16032            payload_buf[0..avail_len].copy_from_slice(__input);
16033            Bytes::new(&payload_buf)
16034        } else {
16035            Bytes::new(__input)
16036        };
16037        let mut __struct = Self::default();
16038        __struct.time_boot_ms = buf.get_u32_le();
16039        __struct.x = buf.get_f32_le();
16040        __struct.y = buf.get_f32_le();
16041        __struct.z = buf.get_f32_le();
16042        __struct.vx = buf.get_f32_le();
16043        __struct.vy = buf.get_f32_le();
16044        __struct.vz = buf.get_f32_le();
16045        __struct.afx = buf.get_f32_le();
16046        __struct.afy = buf.get_f32_le();
16047        __struct.afz = buf.get_f32_le();
16048        __struct.yaw = buf.get_f32_le();
16049        __struct.yaw_rate = buf.get_f32_le();
16050        let tmp = buf.get_u16_le();
16051        __struct.type_mask = PositionTargetTypemask::from_bits(
16052            tmp & PositionTargetTypemask::all().bits(),
16053        )
16054        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16055            flag_type: "PositionTargetTypemask",
16056            value: tmp as u32,
16057        })?;
16058        let tmp = buf.get_u8();
16059        __struct.coordinate_frame =
16060            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16061                enum_type: "MavFrame",
16062                value: tmp as u32,
16063            })?;
16064        Ok(__struct)
16065    }
16066    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16067        let mut __tmp = BytesMut::new(bytes);
16068        #[allow(clippy::absurd_extreme_comparisons)]
16069        #[allow(unused_comparisons)]
16070        if __tmp.remaining() < Self::ENCODED_LEN {
16071            panic!(
16072                "buffer is too small (need {} bytes, but got {})",
16073                Self::ENCODED_LEN,
16074                __tmp.remaining(),
16075            )
16076        }
16077        __tmp.put_u32_le(self.time_boot_ms);
16078        __tmp.put_f32_le(self.x);
16079        __tmp.put_f32_le(self.y);
16080        __tmp.put_f32_le(self.z);
16081        __tmp.put_f32_le(self.vx);
16082        __tmp.put_f32_le(self.vy);
16083        __tmp.put_f32_le(self.vz);
16084        __tmp.put_f32_le(self.afx);
16085        __tmp.put_f32_le(self.afy);
16086        __tmp.put_f32_le(self.afz);
16087        __tmp.put_f32_le(self.yaw);
16088        __tmp.put_f32_le(self.yaw_rate);
16089        __tmp.put_u16_le(self.type_mask.bits());
16090        __tmp.put_u8(self.coordinate_frame as u8);
16091        if matches!(version, MavlinkVersion::V2) {
16092            let len = __tmp.len();
16093            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16094        } else {
16095            __tmp.len()
16096        }
16097    }
16098}
16099#[doc = "id: 271"]
16100#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
16101#[derive(Debug, Clone, PartialEq)]
16102#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16103#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16104pub struct CAMERA_FOV_STATUS_DATA {
16105    #[doc = "Timestamp (time since system boot)."]
16106    pub time_boot_ms: u32,
16107    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
16108    pub lat_camera: i32,
16109    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
16110    pub lon_camera: i32,
16111    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
16112    pub alt_camera: i32,
16113    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
16114    pub lat_image: i32,
16115    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
16116    pub lon_image: i32,
16117    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
16118    pub alt_image: i32,
16119    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
16120    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16121    pub q: [f32; 4],
16122    #[doc = "Horizontal field of view (NaN if unknown)."]
16123    pub hfov: f32,
16124    #[doc = "Vertical field of view (NaN if unknown)."]
16125    pub vfov: f32,
16126    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
16127    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16128    pub camera_device_id: u8,
16129}
16130impl CAMERA_FOV_STATUS_DATA {
16131    pub const ENCODED_LEN: usize = 53usize;
16132    pub const DEFAULT: Self = Self {
16133        time_boot_ms: 0_u32,
16134        lat_camera: 0_i32,
16135        lon_camera: 0_i32,
16136        alt_camera: 0_i32,
16137        lat_image: 0_i32,
16138        lon_image: 0_i32,
16139        alt_image: 0_i32,
16140        q: [0.0_f32; 4usize],
16141        hfov: 0.0_f32,
16142        vfov: 0.0_f32,
16143        camera_device_id: 0_u8,
16144    };
16145    #[cfg(feature = "arbitrary")]
16146    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16147        use arbitrary::{Arbitrary, Unstructured};
16148        let mut buf = [0u8; 1024];
16149        rng.fill_bytes(&mut buf);
16150        let mut unstructured = Unstructured::new(&buf);
16151        Self::arbitrary(&mut unstructured).unwrap_or_default()
16152    }
16153}
16154impl Default for CAMERA_FOV_STATUS_DATA {
16155    fn default() -> Self {
16156        Self::DEFAULT.clone()
16157    }
16158}
16159impl MessageData for CAMERA_FOV_STATUS_DATA {
16160    type Message = MavMessage;
16161    const ID: u32 = 271u32;
16162    const NAME: &'static str = "CAMERA_FOV_STATUS";
16163    const EXTRA_CRC: u8 = 22u8;
16164    const ENCODED_LEN: usize = 53usize;
16165    fn deser(
16166        _version: MavlinkVersion,
16167        __input: &[u8],
16168    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16169        let avail_len = __input.len();
16170        let mut payload_buf = [0; Self::ENCODED_LEN];
16171        let mut buf = if avail_len < Self::ENCODED_LEN {
16172            payload_buf[0..avail_len].copy_from_slice(__input);
16173            Bytes::new(&payload_buf)
16174        } else {
16175            Bytes::new(__input)
16176        };
16177        let mut __struct = Self::default();
16178        __struct.time_boot_ms = buf.get_u32_le();
16179        __struct.lat_camera = buf.get_i32_le();
16180        __struct.lon_camera = buf.get_i32_le();
16181        __struct.alt_camera = buf.get_i32_le();
16182        __struct.lat_image = buf.get_i32_le();
16183        __struct.lon_image = buf.get_i32_le();
16184        __struct.alt_image = buf.get_i32_le();
16185        for v in &mut __struct.q {
16186            let val = buf.get_f32_le();
16187            *v = val;
16188        }
16189        __struct.hfov = buf.get_f32_le();
16190        __struct.vfov = buf.get_f32_le();
16191        __struct.camera_device_id = buf.get_u8();
16192        Ok(__struct)
16193    }
16194    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16195        let mut __tmp = BytesMut::new(bytes);
16196        #[allow(clippy::absurd_extreme_comparisons)]
16197        #[allow(unused_comparisons)]
16198        if __tmp.remaining() < Self::ENCODED_LEN {
16199            panic!(
16200                "buffer is too small (need {} bytes, but got {})",
16201                Self::ENCODED_LEN,
16202                __tmp.remaining(),
16203            )
16204        }
16205        __tmp.put_u32_le(self.time_boot_ms);
16206        __tmp.put_i32_le(self.lat_camera);
16207        __tmp.put_i32_le(self.lon_camera);
16208        __tmp.put_i32_le(self.alt_camera);
16209        __tmp.put_i32_le(self.lat_image);
16210        __tmp.put_i32_le(self.lon_image);
16211        __tmp.put_i32_le(self.alt_image);
16212        for val in &self.q {
16213            __tmp.put_f32_le(*val);
16214        }
16215        __tmp.put_f32_le(self.hfov);
16216        __tmp.put_f32_le(self.vfov);
16217        __tmp.put_u8(self.camera_device_id);
16218        if matches!(version, MavlinkVersion::V2) {
16219            let len = __tmp.len();
16220            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16221        } else {
16222            __tmp.len()
16223        }
16224    }
16225}
16226#[doc = "id: 81"]
16227#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
16228#[derive(Debug, Clone, PartialEq)]
16229#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16230#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16231pub struct MANUAL_SETPOINT_DATA {
16232    #[doc = "Timestamp (time since system boot)."]
16233    pub time_boot_ms: u32,
16234    #[doc = "Desired roll rate"]
16235    pub roll: f32,
16236    #[doc = "Desired pitch rate"]
16237    pub pitch: f32,
16238    #[doc = "Desired yaw rate"]
16239    pub yaw: f32,
16240    #[doc = "Collective thrust, normalized to 0 .. 1"]
16241    pub thrust: f32,
16242    #[doc = "Flight mode switch position, 0.. 255"]
16243    pub mode_switch: u8,
16244    #[doc = "Override mode switch position, 0.. 255"]
16245    pub manual_override_switch: u8,
16246}
16247impl MANUAL_SETPOINT_DATA {
16248    pub const ENCODED_LEN: usize = 22usize;
16249    pub const DEFAULT: Self = Self {
16250        time_boot_ms: 0_u32,
16251        roll: 0.0_f32,
16252        pitch: 0.0_f32,
16253        yaw: 0.0_f32,
16254        thrust: 0.0_f32,
16255        mode_switch: 0_u8,
16256        manual_override_switch: 0_u8,
16257    };
16258    #[cfg(feature = "arbitrary")]
16259    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16260        use arbitrary::{Arbitrary, Unstructured};
16261        let mut buf = [0u8; 1024];
16262        rng.fill_bytes(&mut buf);
16263        let mut unstructured = Unstructured::new(&buf);
16264        Self::arbitrary(&mut unstructured).unwrap_or_default()
16265    }
16266}
16267impl Default for MANUAL_SETPOINT_DATA {
16268    fn default() -> Self {
16269        Self::DEFAULT.clone()
16270    }
16271}
16272impl MessageData for MANUAL_SETPOINT_DATA {
16273    type Message = MavMessage;
16274    const ID: u32 = 81u32;
16275    const NAME: &'static str = "MANUAL_SETPOINT";
16276    const EXTRA_CRC: u8 = 106u8;
16277    const ENCODED_LEN: usize = 22usize;
16278    fn deser(
16279        _version: MavlinkVersion,
16280        __input: &[u8],
16281    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16282        let avail_len = __input.len();
16283        let mut payload_buf = [0; Self::ENCODED_LEN];
16284        let mut buf = if avail_len < Self::ENCODED_LEN {
16285            payload_buf[0..avail_len].copy_from_slice(__input);
16286            Bytes::new(&payload_buf)
16287        } else {
16288            Bytes::new(__input)
16289        };
16290        let mut __struct = Self::default();
16291        __struct.time_boot_ms = buf.get_u32_le();
16292        __struct.roll = buf.get_f32_le();
16293        __struct.pitch = buf.get_f32_le();
16294        __struct.yaw = buf.get_f32_le();
16295        __struct.thrust = buf.get_f32_le();
16296        __struct.mode_switch = buf.get_u8();
16297        __struct.manual_override_switch = buf.get_u8();
16298        Ok(__struct)
16299    }
16300    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16301        let mut __tmp = BytesMut::new(bytes);
16302        #[allow(clippy::absurd_extreme_comparisons)]
16303        #[allow(unused_comparisons)]
16304        if __tmp.remaining() < Self::ENCODED_LEN {
16305            panic!(
16306                "buffer is too small (need {} bytes, but got {})",
16307                Self::ENCODED_LEN,
16308                __tmp.remaining(),
16309            )
16310        }
16311        __tmp.put_u32_le(self.time_boot_ms);
16312        __tmp.put_f32_le(self.roll);
16313        __tmp.put_f32_le(self.pitch);
16314        __tmp.put_f32_le(self.yaw);
16315        __tmp.put_f32_le(self.thrust);
16316        __tmp.put_u8(self.mode_switch);
16317        __tmp.put_u8(self.manual_override_switch);
16318        if matches!(version, MavlinkVersion::V2) {
16319            let len = __tmp.len();
16320            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16321        } else {
16322            __tmp.len()
16323        }
16324    }
16325}
16326#[doc = "id: 2"]
16327#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
16328#[derive(Debug, Clone, PartialEq)]
16329#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16330#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16331pub struct SYSTEM_TIME_DATA {
16332    #[doc = "Timestamp (UNIX epoch time)."]
16333    pub time_unix_usec: u64,
16334    #[doc = "Timestamp (time since system boot)."]
16335    pub time_boot_ms: u32,
16336}
16337impl SYSTEM_TIME_DATA {
16338    pub const ENCODED_LEN: usize = 12usize;
16339    pub const DEFAULT: Self = Self {
16340        time_unix_usec: 0_u64,
16341        time_boot_ms: 0_u32,
16342    };
16343    #[cfg(feature = "arbitrary")]
16344    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16345        use arbitrary::{Arbitrary, Unstructured};
16346        let mut buf = [0u8; 1024];
16347        rng.fill_bytes(&mut buf);
16348        let mut unstructured = Unstructured::new(&buf);
16349        Self::arbitrary(&mut unstructured).unwrap_or_default()
16350    }
16351}
16352impl Default for SYSTEM_TIME_DATA {
16353    fn default() -> Self {
16354        Self::DEFAULT.clone()
16355    }
16356}
16357impl MessageData for SYSTEM_TIME_DATA {
16358    type Message = MavMessage;
16359    const ID: u32 = 2u32;
16360    const NAME: &'static str = "SYSTEM_TIME";
16361    const EXTRA_CRC: u8 = 137u8;
16362    const ENCODED_LEN: usize = 12usize;
16363    fn deser(
16364        _version: MavlinkVersion,
16365        __input: &[u8],
16366    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16367        let avail_len = __input.len();
16368        let mut payload_buf = [0; Self::ENCODED_LEN];
16369        let mut buf = if avail_len < Self::ENCODED_LEN {
16370            payload_buf[0..avail_len].copy_from_slice(__input);
16371            Bytes::new(&payload_buf)
16372        } else {
16373            Bytes::new(__input)
16374        };
16375        let mut __struct = Self::default();
16376        __struct.time_unix_usec = buf.get_u64_le();
16377        __struct.time_boot_ms = buf.get_u32_le();
16378        Ok(__struct)
16379    }
16380    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16381        let mut __tmp = BytesMut::new(bytes);
16382        #[allow(clippy::absurd_extreme_comparisons)]
16383        #[allow(unused_comparisons)]
16384        if __tmp.remaining() < Self::ENCODED_LEN {
16385            panic!(
16386                "buffer is too small (need {} bytes, but got {})",
16387                Self::ENCODED_LEN,
16388                __tmp.remaining(),
16389            )
16390        }
16391        __tmp.put_u64_le(self.time_unix_usec);
16392        __tmp.put_u32_le(self.time_boot_ms);
16393        if matches!(version, MavlinkVersion::V2) {
16394            let len = __tmp.len();
16395            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16396        } else {
16397            __tmp.len()
16398        }
16399    }
16400}
16401#[doc = "id: 48"]
16402#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
16403#[derive(Debug, Clone, PartialEq)]
16404#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16405#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16406pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
16407    #[doc = "Latitude (WGS84)"]
16408    pub latitude: i32,
16409    #[doc = "Longitude (WGS84)"]
16410    pub longitude: i32,
16411    #[doc = "Altitude (MSL). Positive for up."]
16412    pub altitude: i32,
16413    #[doc = "System ID"]
16414    pub target_system: u8,
16415    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16416    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16417    pub time_usec: u64,
16418}
16419impl SET_GPS_GLOBAL_ORIGIN_DATA {
16420    pub const ENCODED_LEN: usize = 21usize;
16421    pub const DEFAULT: Self = Self {
16422        latitude: 0_i32,
16423        longitude: 0_i32,
16424        altitude: 0_i32,
16425        target_system: 0_u8,
16426        time_usec: 0_u64,
16427    };
16428    #[cfg(feature = "arbitrary")]
16429    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16430        use arbitrary::{Arbitrary, Unstructured};
16431        let mut buf = [0u8; 1024];
16432        rng.fill_bytes(&mut buf);
16433        let mut unstructured = Unstructured::new(&buf);
16434        Self::arbitrary(&mut unstructured).unwrap_or_default()
16435    }
16436}
16437impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
16438    fn default() -> Self {
16439        Self::DEFAULT.clone()
16440    }
16441}
16442impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
16443    type Message = MavMessage;
16444    const ID: u32 = 48u32;
16445    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
16446    const EXTRA_CRC: u8 = 41u8;
16447    const ENCODED_LEN: usize = 21usize;
16448    fn deser(
16449        _version: MavlinkVersion,
16450        __input: &[u8],
16451    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16452        let avail_len = __input.len();
16453        let mut payload_buf = [0; Self::ENCODED_LEN];
16454        let mut buf = if avail_len < Self::ENCODED_LEN {
16455            payload_buf[0..avail_len].copy_from_slice(__input);
16456            Bytes::new(&payload_buf)
16457        } else {
16458            Bytes::new(__input)
16459        };
16460        let mut __struct = Self::default();
16461        __struct.latitude = buf.get_i32_le();
16462        __struct.longitude = buf.get_i32_le();
16463        __struct.altitude = buf.get_i32_le();
16464        __struct.target_system = buf.get_u8();
16465        __struct.time_usec = buf.get_u64_le();
16466        Ok(__struct)
16467    }
16468    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16469        let mut __tmp = BytesMut::new(bytes);
16470        #[allow(clippy::absurd_extreme_comparisons)]
16471        #[allow(unused_comparisons)]
16472        if __tmp.remaining() < Self::ENCODED_LEN {
16473            panic!(
16474                "buffer is too small (need {} bytes, but got {})",
16475                Self::ENCODED_LEN,
16476                __tmp.remaining(),
16477            )
16478        }
16479        __tmp.put_i32_le(self.latitude);
16480        __tmp.put_i32_le(self.longitude);
16481        __tmp.put_i32_le(self.altitude);
16482        __tmp.put_u8(self.target_system);
16483        __tmp.put_u64_le(self.time_usec);
16484        if matches!(version, MavlinkVersion::V2) {
16485            let len = __tmp.len();
16486            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16487        } else {
16488            __tmp.len()
16489        }
16490    }
16491}
16492#[doc = "id: 127"]
16493#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
16494#[derive(Debug, Clone, PartialEq)]
16495#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16496#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16497pub struct GPS_RTK_DATA {
16498    #[doc = "Time since boot of last baseline message received."]
16499    pub time_last_baseline_ms: u32,
16500    #[doc = "GPS Time of Week of last baseline"]
16501    pub tow: u32,
16502    #[doc = "Current baseline in ECEF x or NED north component."]
16503    pub baseline_a_mm: i32,
16504    #[doc = "Current baseline in ECEF y or NED east component."]
16505    pub baseline_b_mm: i32,
16506    #[doc = "Current baseline in ECEF z or NED down component."]
16507    pub baseline_c_mm: i32,
16508    #[doc = "Current estimate of baseline accuracy."]
16509    pub accuracy: u32,
16510    #[doc = "Current number of integer ambiguity hypotheses."]
16511    pub iar_num_hypotheses: i32,
16512    #[doc = "GPS Week Number of last baseline"]
16513    pub wn: u16,
16514    #[doc = "Identification of connected RTK receiver."]
16515    pub rtk_receiver_id: u8,
16516    #[doc = "GPS-specific health report for RTK data."]
16517    pub rtk_health: u8,
16518    #[doc = "Rate of baseline messages being received by GPS"]
16519    pub rtk_rate: u8,
16520    #[doc = "Current number of sats used for RTK calculation."]
16521    pub nsats: u8,
16522    #[doc = "Coordinate system of baseline"]
16523    pub baseline_coords_type: RtkBaselineCoordinateSystem,
16524}
16525impl GPS_RTK_DATA {
16526    pub const ENCODED_LEN: usize = 35usize;
16527    pub const DEFAULT: Self = Self {
16528        time_last_baseline_ms: 0_u32,
16529        tow: 0_u32,
16530        baseline_a_mm: 0_i32,
16531        baseline_b_mm: 0_i32,
16532        baseline_c_mm: 0_i32,
16533        accuracy: 0_u32,
16534        iar_num_hypotheses: 0_i32,
16535        wn: 0_u16,
16536        rtk_receiver_id: 0_u8,
16537        rtk_health: 0_u8,
16538        rtk_rate: 0_u8,
16539        nsats: 0_u8,
16540        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
16541    };
16542    #[cfg(feature = "arbitrary")]
16543    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16544        use arbitrary::{Arbitrary, Unstructured};
16545        let mut buf = [0u8; 1024];
16546        rng.fill_bytes(&mut buf);
16547        let mut unstructured = Unstructured::new(&buf);
16548        Self::arbitrary(&mut unstructured).unwrap_or_default()
16549    }
16550}
16551impl Default for GPS_RTK_DATA {
16552    fn default() -> Self {
16553        Self::DEFAULT.clone()
16554    }
16555}
16556impl MessageData for GPS_RTK_DATA {
16557    type Message = MavMessage;
16558    const ID: u32 = 127u32;
16559    const NAME: &'static str = "GPS_RTK";
16560    const EXTRA_CRC: u8 = 25u8;
16561    const ENCODED_LEN: usize = 35usize;
16562    fn deser(
16563        _version: MavlinkVersion,
16564        __input: &[u8],
16565    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16566        let avail_len = __input.len();
16567        let mut payload_buf = [0; Self::ENCODED_LEN];
16568        let mut buf = if avail_len < Self::ENCODED_LEN {
16569            payload_buf[0..avail_len].copy_from_slice(__input);
16570            Bytes::new(&payload_buf)
16571        } else {
16572            Bytes::new(__input)
16573        };
16574        let mut __struct = Self::default();
16575        __struct.time_last_baseline_ms = buf.get_u32_le();
16576        __struct.tow = buf.get_u32_le();
16577        __struct.baseline_a_mm = buf.get_i32_le();
16578        __struct.baseline_b_mm = buf.get_i32_le();
16579        __struct.baseline_c_mm = buf.get_i32_le();
16580        __struct.accuracy = buf.get_u32_le();
16581        __struct.iar_num_hypotheses = buf.get_i32_le();
16582        __struct.wn = buf.get_u16_le();
16583        __struct.rtk_receiver_id = buf.get_u8();
16584        __struct.rtk_health = buf.get_u8();
16585        __struct.rtk_rate = buf.get_u8();
16586        __struct.nsats = buf.get_u8();
16587        let tmp = buf.get_u8();
16588        __struct.baseline_coords_type =
16589            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16590                enum_type: "RtkBaselineCoordinateSystem",
16591                value: tmp as u32,
16592            })?;
16593        Ok(__struct)
16594    }
16595    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16596        let mut __tmp = BytesMut::new(bytes);
16597        #[allow(clippy::absurd_extreme_comparisons)]
16598        #[allow(unused_comparisons)]
16599        if __tmp.remaining() < Self::ENCODED_LEN {
16600            panic!(
16601                "buffer is too small (need {} bytes, but got {})",
16602                Self::ENCODED_LEN,
16603                __tmp.remaining(),
16604            )
16605        }
16606        __tmp.put_u32_le(self.time_last_baseline_ms);
16607        __tmp.put_u32_le(self.tow);
16608        __tmp.put_i32_le(self.baseline_a_mm);
16609        __tmp.put_i32_le(self.baseline_b_mm);
16610        __tmp.put_i32_le(self.baseline_c_mm);
16611        __tmp.put_u32_le(self.accuracy);
16612        __tmp.put_i32_le(self.iar_num_hypotheses);
16613        __tmp.put_u16_le(self.wn);
16614        __tmp.put_u8(self.rtk_receiver_id);
16615        __tmp.put_u8(self.rtk_health);
16616        __tmp.put_u8(self.rtk_rate);
16617        __tmp.put_u8(self.nsats);
16618        __tmp.put_u8(self.baseline_coords_type as u8);
16619        if matches!(version, MavlinkVersion::V2) {
16620            let len = __tmp.len();
16621            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16622        } else {
16623            __tmp.len()
16624        }
16625    }
16626}
16627#[doc = "id: 89"]
16628#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
16629#[derive(Debug, Clone, PartialEq)]
16630#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16631#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16632pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
16633    #[doc = "Timestamp (time since system boot)."]
16634    pub time_boot_ms: u32,
16635    #[doc = "X Position"]
16636    pub x: f32,
16637    #[doc = "Y Position"]
16638    pub y: f32,
16639    #[doc = "Z Position"]
16640    pub z: f32,
16641    #[doc = "Roll"]
16642    pub roll: f32,
16643    #[doc = "Pitch"]
16644    pub pitch: f32,
16645    #[doc = "Yaw"]
16646    pub yaw: f32,
16647}
16648impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
16649    pub const ENCODED_LEN: usize = 28usize;
16650    pub const DEFAULT: Self = Self {
16651        time_boot_ms: 0_u32,
16652        x: 0.0_f32,
16653        y: 0.0_f32,
16654        z: 0.0_f32,
16655        roll: 0.0_f32,
16656        pitch: 0.0_f32,
16657        yaw: 0.0_f32,
16658    };
16659    #[cfg(feature = "arbitrary")]
16660    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16661        use arbitrary::{Arbitrary, Unstructured};
16662        let mut buf = [0u8; 1024];
16663        rng.fill_bytes(&mut buf);
16664        let mut unstructured = Unstructured::new(&buf);
16665        Self::arbitrary(&mut unstructured).unwrap_or_default()
16666    }
16667}
16668impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
16669    fn default() -> Self {
16670        Self::DEFAULT.clone()
16671    }
16672}
16673impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
16674    type Message = MavMessage;
16675    const ID: u32 = 89u32;
16676    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
16677    const EXTRA_CRC: u8 = 231u8;
16678    const ENCODED_LEN: usize = 28usize;
16679    fn deser(
16680        _version: MavlinkVersion,
16681        __input: &[u8],
16682    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16683        let avail_len = __input.len();
16684        let mut payload_buf = [0; Self::ENCODED_LEN];
16685        let mut buf = if avail_len < Self::ENCODED_LEN {
16686            payload_buf[0..avail_len].copy_from_slice(__input);
16687            Bytes::new(&payload_buf)
16688        } else {
16689            Bytes::new(__input)
16690        };
16691        let mut __struct = Self::default();
16692        __struct.time_boot_ms = buf.get_u32_le();
16693        __struct.x = buf.get_f32_le();
16694        __struct.y = buf.get_f32_le();
16695        __struct.z = buf.get_f32_le();
16696        __struct.roll = buf.get_f32_le();
16697        __struct.pitch = buf.get_f32_le();
16698        __struct.yaw = buf.get_f32_le();
16699        Ok(__struct)
16700    }
16701    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16702        let mut __tmp = BytesMut::new(bytes);
16703        #[allow(clippy::absurd_extreme_comparisons)]
16704        #[allow(unused_comparisons)]
16705        if __tmp.remaining() < Self::ENCODED_LEN {
16706            panic!(
16707                "buffer is too small (need {} bytes, but got {})",
16708                Self::ENCODED_LEN,
16709                __tmp.remaining(),
16710            )
16711        }
16712        __tmp.put_u32_le(self.time_boot_ms);
16713        __tmp.put_f32_le(self.x);
16714        __tmp.put_f32_le(self.y);
16715        __tmp.put_f32_le(self.z);
16716        __tmp.put_f32_le(self.roll);
16717        __tmp.put_f32_le(self.pitch);
16718        __tmp.put_f32_le(self.yaw);
16719        if matches!(version, MavlinkVersion::V2) {
16720            let len = __tmp.len();
16721            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16722        } else {
16723            __tmp.len()
16724        }
16725    }
16726}
16727#[doc = "id: 108"]
16728#[doc = "Status of simulation environment, if used."]
16729#[derive(Debug, Clone, PartialEq)]
16730#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16731#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16732pub struct SIM_STATE_DATA {
16733    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
16734    pub q1: f32,
16735    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
16736    pub q2: f32,
16737    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
16738    pub q3: f32,
16739    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
16740    pub q4: f32,
16741    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
16742    pub roll: f32,
16743    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
16744    pub pitch: f32,
16745    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
16746    pub yaw: f32,
16747    #[doc = "X acceleration"]
16748    pub xacc: f32,
16749    #[doc = "Y acceleration"]
16750    pub yacc: f32,
16751    #[doc = "Z acceleration"]
16752    pub zacc: f32,
16753    #[doc = "Angular speed around X axis"]
16754    pub xgyro: f32,
16755    #[doc = "Angular speed around Y axis"]
16756    pub ygyro: f32,
16757    #[doc = "Angular speed around Z axis"]
16758    pub zgyro: f32,
16759    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
16760    pub lat: f32,
16761    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
16762    pub lon: f32,
16763    #[doc = "Altitude"]
16764    pub alt: f32,
16765    #[doc = "Horizontal position standard deviation"]
16766    pub std_dev_horz: f32,
16767    #[doc = "Vertical position standard deviation"]
16768    pub std_dev_vert: f32,
16769    #[doc = "True velocity in north direction in earth-fixed NED frame"]
16770    pub vn: f32,
16771    #[doc = "True velocity in east direction in earth-fixed NED frame"]
16772    pub ve: f32,
16773    #[doc = "True velocity in down direction in earth-fixed NED frame"]
16774    pub vd: f32,
16775    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
16776    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16777    pub lat_int: i32,
16778    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
16779    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16780    pub lon_int: i32,
16781}
16782impl SIM_STATE_DATA {
16783    pub const ENCODED_LEN: usize = 92usize;
16784    pub const DEFAULT: Self = Self {
16785        q1: 0.0_f32,
16786        q2: 0.0_f32,
16787        q3: 0.0_f32,
16788        q4: 0.0_f32,
16789        roll: 0.0_f32,
16790        pitch: 0.0_f32,
16791        yaw: 0.0_f32,
16792        xacc: 0.0_f32,
16793        yacc: 0.0_f32,
16794        zacc: 0.0_f32,
16795        xgyro: 0.0_f32,
16796        ygyro: 0.0_f32,
16797        zgyro: 0.0_f32,
16798        lat: 0.0_f32,
16799        lon: 0.0_f32,
16800        alt: 0.0_f32,
16801        std_dev_horz: 0.0_f32,
16802        std_dev_vert: 0.0_f32,
16803        vn: 0.0_f32,
16804        ve: 0.0_f32,
16805        vd: 0.0_f32,
16806        lat_int: 0_i32,
16807        lon_int: 0_i32,
16808    };
16809    #[cfg(feature = "arbitrary")]
16810    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16811        use arbitrary::{Arbitrary, Unstructured};
16812        let mut buf = [0u8; 1024];
16813        rng.fill_bytes(&mut buf);
16814        let mut unstructured = Unstructured::new(&buf);
16815        Self::arbitrary(&mut unstructured).unwrap_or_default()
16816    }
16817}
16818impl Default for SIM_STATE_DATA {
16819    fn default() -> Self {
16820        Self::DEFAULT.clone()
16821    }
16822}
16823impl MessageData for SIM_STATE_DATA {
16824    type Message = MavMessage;
16825    const ID: u32 = 108u32;
16826    const NAME: &'static str = "SIM_STATE";
16827    const EXTRA_CRC: u8 = 32u8;
16828    const ENCODED_LEN: usize = 92usize;
16829    fn deser(
16830        _version: MavlinkVersion,
16831        __input: &[u8],
16832    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16833        let avail_len = __input.len();
16834        let mut payload_buf = [0; Self::ENCODED_LEN];
16835        let mut buf = if avail_len < Self::ENCODED_LEN {
16836            payload_buf[0..avail_len].copy_from_slice(__input);
16837            Bytes::new(&payload_buf)
16838        } else {
16839            Bytes::new(__input)
16840        };
16841        let mut __struct = Self::default();
16842        __struct.q1 = buf.get_f32_le();
16843        __struct.q2 = buf.get_f32_le();
16844        __struct.q3 = buf.get_f32_le();
16845        __struct.q4 = buf.get_f32_le();
16846        __struct.roll = buf.get_f32_le();
16847        __struct.pitch = buf.get_f32_le();
16848        __struct.yaw = buf.get_f32_le();
16849        __struct.xacc = buf.get_f32_le();
16850        __struct.yacc = buf.get_f32_le();
16851        __struct.zacc = buf.get_f32_le();
16852        __struct.xgyro = buf.get_f32_le();
16853        __struct.ygyro = buf.get_f32_le();
16854        __struct.zgyro = buf.get_f32_le();
16855        __struct.lat = buf.get_f32_le();
16856        __struct.lon = buf.get_f32_le();
16857        __struct.alt = buf.get_f32_le();
16858        __struct.std_dev_horz = buf.get_f32_le();
16859        __struct.std_dev_vert = buf.get_f32_le();
16860        __struct.vn = buf.get_f32_le();
16861        __struct.ve = buf.get_f32_le();
16862        __struct.vd = buf.get_f32_le();
16863        __struct.lat_int = buf.get_i32_le();
16864        __struct.lon_int = buf.get_i32_le();
16865        Ok(__struct)
16866    }
16867    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16868        let mut __tmp = BytesMut::new(bytes);
16869        #[allow(clippy::absurd_extreme_comparisons)]
16870        #[allow(unused_comparisons)]
16871        if __tmp.remaining() < Self::ENCODED_LEN {
16872            panic!(
16873                "buffer is too small (need {} bytes, but got {})",
16874                Self::ENCODED_LEN,
16875                __tmp.remaining(),
16876            )
16877        }
16878        __tmp.put_f32_le(self.q1);
16879        __tmp.put_f32_le(self.q2);
16880        __tmp.put_f32_le(self.q3);
16881        __tmp.put_f32_le(self.q4);
16882        __tmp.put_f32_le(self.roll);
16883        __tmp.put_f32_le(self.pitch);
16884        __tmp.put_f32_le(self.yaw);
16885        __tmp.put_f32_le(self.xacc);
16886        __tmp.put_f32_le(self.yacc);
16887        __tmp.put_f32_le(self.zacc);
16888        __tmp.put_f32_le(self.xgyro);
16889        __tmp.put_f32_le(self.ygyro);
16890        __tmp.put_f32_le(self.zgyro);
16891        __tmp.put_f32_le(self.lat);
16892        __tmp.put_f32_le(self.lon);
16893        __tmp.put_f32_le(self.alt);
16894        __tmp.put_f32_le(self.std_dev_horz);
16895        __tmp.put_f32_le(self.std_dev_vert);
16896        __tmp.put_f32_le(self.vn);
16897        __tmp.put_f32_le(self.ve);
16898        __tmp.put_f32_le(self.vd);
16899        __tmp.put_i32_le(self.lat_int);
16900        __tmp.put_i32_le(self.lon_int);
16901        if matches!(version, MavlinkVersion::V2) {
16902            let len = __tmp.len();
16903            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16904        } else {
16905            __tmp.len()
16906        }
16907    }
16908}
16909#[doc = "id: 92"]
16910#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
16911#[derive(Debug, Clone, PartialEq)]
16912#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16913#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16914pub struct HIL_RC_INPUTS_RAW_DATA {
16915    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16916    pub time_usec: u64,
16917    #[doc = "RC channel 1 value"]
16918    pub chan1_raw: u16,
16919    #[doc = "RC channel 2 value"]
16920    pub chan2_raw: u16,
16921    #[doc = "RC channel 3 value"]
16922    pub chan3_raw: u16,
16923    #[doc = "RC channel 4 value"]
16924    pub chan4_raw: u16,
16925    #[doc = "RC channel 5 value"]
16926    pub chan5_raw: u16,
16927    #[doc = "RC channel 6 value"]
16928    pub chan6_raw: u16,
16929    #[doc = "RC channel 7 value"]
16930    pub chan7_raw: u16,
16931    #[doc = "RC channel 8 value"]
16932    pub chan8_raw: u16,
16933    #[doc = "RC channel 9 value"]
16934    pub chan9_raw: u16,
16935    #[doc = "RC channel 10 value"]
16936    pub chan10_raw: u16,
16937    #[doc = "RC channel 11 value"]
16938    pub chan11_raw: u16,
16939    #[doc = "RC channel 12 value"]
16940    pub chan12_raw: u16,
16941    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
16942    pub rssi: u8,
16943}
16944impl HIL_RC_INPUTS_RAW_DATA {
16945    pub const ENCODED_LEN: usize = 33usize;
16946    pub const DEFAULT: Self = Self {
16947        time_usec: 0_u64,
16948        chan1_raw: 0_u16,
16949        chan2_raw: 0_u16,
16950        chan3_raw: 0_u16,
16951        chan4_raw: 0_u16,
16952        chan5_raw: 0_u16,
16953        chan6_raw: 0_u16,
16954        chan7_raw: 0_u16,
16955        chan8_raw: 0_u16,
16956        chan9_raw: 0_u16,
16957        chan10_raw: 0_u16,
16958        chan11_raw: 0_u16,
16959        chan12_raw: 0_u16,
16960        rssi: 0_u8,
16961    };
16962    #[cfg(feature = "arbitrary")]
16963    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16964        use arbitrary::{Arbitrary, Unstructured};
16965        let mut buf = [0u8; 1024];
16966        rng.fill_bytes(&mut buf);
16967        let mut unstructured = Unstructured::new(&buf);
16968        Self::arbitrary(&mut unstructured).unwrap_or_default()
16969    }
16970}
16971impl Default for HIL_RC_INPUTS_RAW_DATA {
16972    fn default() -> Self {
16973        Self::DEFAULT.clone()
16974    }
16975}
16976impl MessageData for HIL_RC_INPUTS_RAW_DATA {
16977    type Message = MavMessage;
16978    const ID: u32 = 92u32;
16979    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
16980    const EXTRA_CRC: u8 = 54u8;
16981    const ENCODED_LEN: usize = 33usize;
16982    fn deser(
16983        _version: MavlinkVersion,
16984        __input: &[u8],
16985    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16986        let avail_len = __input.len();
16987        let mut payload_buf = [0; Self::ENCODED_LEN];
16988        let mut buf = if avail_len < Self::ENCODED_LEN {
16989            payload_buf[0..avail_len].copy_from_slice(__input);
16990            Bytes::new(&payload_buf)
16991        } else {
16992            Bytes::new(__input)
16993        };
16994        let mut __struct = Self::default();
16995        __struct.time_usec = buf.get_u64_le();
16996        __struct.chan1_raw = buf.get_u16_le();
16997        __struct.chan2_raw = buf.get_u16_le();
16998        __struct.chan3_raw = buf.get_u16_le();
16999        __struct.chan4_raw = buf.get_u16_le();
17000        __struct.chan5_raw = buf.get_u16_le();
17001        __struct.chan6_raw = buf.get_u16_le();
17002        __struct.chan7_raw = buf.get_u16_le();
17003        __struct.chan8_raw = buf.get_u16_le();
17004        __struct.chan9_raw = buf.get_u16_le();
17005        __struct.chan10_raw = buf.get_u16_le();
17006        __struct.chan11_raw = buf.get_u16_le();
17007        __struct.chan12_raw = buf.get_u16_le();
17008        __struct.rssi = buf.get_u8();
17009        Ok(__struct)
17010    }
17011    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17012        let mut __tmp = BytesMut::new(bytes);
17013        #[allow(clippy::absurd_extreme_comparisons)]
17014        #[allow(unused_comparisons)]
17015        if __tmp.remaining() < Self::ENCODED_LEN {
17016            panic!(
17017                "buffer is too small (need {} bytes, but got {})",
17018                Self::ENCODED_LEN,
17019                __tmp.remaining(),
17020            )
17021        }
17022        __tmp.put_u64_le(self.time_usec);
17023        __tmp.put_u16_le(self.chan1_raw);
17024        __tmp.put_u16_le(self.chan2_raw);
17025        __tmp.put_u16_le(self.chan3_raw);
17026        __tmp.put_u16_le(self.chan4_raw);
17027        __tmp.put_u16_le(self.chan5_raw);
17028        __tmp.put_u16_le(self.chan6_raw);
17029        __tmp.put_u16_le(self.chan7_raw);
17030        __tmp.put_u16_le(self.chan8_raw);
17031        __tmp.put_u16_le(self.chan9_raw);
17032        __tmp.put_u16_le(self.chan10_raw);
17033        __tmp.put_u16_le(self.chan11_raw);
17034        __tmp.put_u16_le(self.chan12_raw);
17035        __tmp.put_u8(self.rssi);
17036        if matches!(version, MavlinkVersion::V2) {
17037            let len = __tmp.len();
17038            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17039        } else {
17040            __tmp.len()
17041        }
17042    }
17043}
17044#[doc = "id: 248"]
17045#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
17046#[derive(Debug, Clone, PartialEq)]
17047#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17048#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17049pub struct V2_EXTENSION_DATA {
17050    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
17051    pub message_type: u16,
17052    #[doc = "Network ID (0 for broadcast)"]
17053    pub target_network: u8,
17054    #[doc = "System ID (0 for broadcast)"]
17055    pub target_system: u8,
17056    #[doc = "Component ID (0 for broadcast)"]
17057    pub target_component: u8,
17058    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
17059    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17060    pub payload: [u8; 249],
17061}
17062impl V2_EXTENSION_DATA {
17063    pub const ENCODED_LEN: usize = 254usize;
17064    pub const DEFAULT: Self = Self {
17065        message_type: 0_u16,
17066        target_network: 0_u8,
17067        target_system: 0_u8,
17068        target_component: 0_u8,
17069        payload: [0_u8; 249usize],
17070    };
17071    #[cfg(feature = "arbitrary")]
17072    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17073        use arbitrary::{Arbitrary, Unstructured};
17074        let mut buf = [0u8; 1024];
17075        rng.fill_bytes(&mut buf);
17076        let mut unstructured = Unstructured::new(&buf);
17077        Self::arbitrary(&mut unstructured).unwrap_or_default()
17078    }
17079}
17080impl Default for V2_EXTENSION_DATA {
17081    fn default() -> Self {
17082        Self::DEFAULT.clone()
17083    }
17084}
17085impl MessageData for V2_EXTENSION_DATA {
17086    type Message = MavMessage;
17087    const ID: u32 = 248u32;
17088    const NAME: &'static str = "V2_EXTENSION";
17089    const EXTRA_CRC: u8 = 8u8;
17090    const ENCODED_LEN: usize = 254usize;
17091    fn deser(
17092        _version: MavlinkVersion,
17093        __input: &[u8],
17094    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17095        let avail_len = __input.len();
17096        let mut payload_buf = [0; Self::ENCODED_LEN];
17097        let mut buf = if avail_len < Self::ENCODED_LEN {
17098            payload_buf[0..avail_len].copy_from_slice(__input);
17099            Bytes::new(&payload_buf)
17100        } else {
17101            Bytes::new(__input)
17102        };
17103        let mut __struct = Self::default();
17104        __struct.message_type = buf.get_u16_le();
17105        __struct.target_network = buf.get_u8();
17106        __struct.target_system = buf.get_u8();
17107        __struct.target_component = buf.get_u8();
17108        for v in &mut __struct.payload {
17109            let val = buf.get_u8();
17110            *v = val;
17111        }
17112        Ok(__struct)
17113    }
17114    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17115        let mut __tmp = BytesMut::new(bytes);
17116        #[allow(clippy::absurd_extreme_comparisons)]
17117        #[allow(unused_comparisons)]
17118        if __tmp.remaining() < Self::ENCODED_LEN {
17119            panic!(
17120                "buffer is too small (need {} bytes, but got {})",
17121                Self::ENCODED_LEN,
17122                __tmp.remaining(),
17123            )
17124        }
17125        __tmp.put_u16_le(self.message_type);
17126        __tmp.put_u8(self.target_network);
17127        __tmp.put_u8(self.target_system);
17128        __tmp.put_u8(self.target_component);
17129        for val in &self.payload {
17130            __tmp.put_u8(*val);
17131        }
17132        if matches!(version, MavlinkVersion::V2) {
17133            let len = __tmp.len();
17134            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17135        } else {
17136            __tmp.len()
17137        }
17138    }
17139}
17140#[doc = "id: 131"]
17141#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
17142#[derive(Debug, Clone, PartialEq)]
17143#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17144#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17145pub struct ENCAPSULATED_DATA_DATA {
17146    #[doc = "sequence number (starting with 0 on every transmission)"]
17147    pub seqnr: u16,
17148    #[doc = "image data bytes"]
17149    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17150    pub data: [u8; 253],
17151}
17152impl ENCAPSULATED_DATA_DATA {
17153    pub const ENCODED_LEN: usize = 255usize;
17154    pub const DEFAULT: Self = Self {
17155        seqnr: 0_u16,
17156        data: [0_u8; 253usize],
17157    };
17158    #[cfg(feature = "arbitrary")]
17159    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17160        use arbitrary::{Arbitrary, Unstructured};
17161        let mut buf = [0u8; 1024];
17162        rng.fill_bytes(&mut buf);
17163        let mut unstructured = Unstructured::new(&buf);
17164        Self::arbitrary(&mut unstructured).unwrap_or_default()
17165    }
17166}
17167impl Default for ENCAPSULATED_DATA_DATA {
17168    fn default() -> Self {
17169        Self::DEFAULT.clone()
17170    }
17171}
17172impl MessageData for ENCAPSULATED_DATA_DATA {
17173    type Message = MavMessage;
17174    const ID: u32 = 131u32;
17175    const NAME: &'static str = "ENCAPSULATED_DATA";
17176    const EXTRA_CRC: u8 = 223u8;
17177    const ENCODED_LEN: usize = 255usize;
17178    fn deser(
17179        _version: MavlinkVersion,
17180        __input: &[u8],
17181    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17182        let avail_len = __input.len();
17183        let mut payload_buf = [0; Self::ENCODED_LEN];
17184        let mut buf = if avail_len < Self::ENCODED_LEN {
17185            payload_buf[0..avail_len].copy_from_slice(__input);
17186            Bytes::new(&payload_buf)
17187        } else {
17188            Bytes::new(__input)
17189        };
17190        let mut __struct = Self::default();
17191        __struct.seqnr = buf.get_u16_le();
17192        for v in &mut __struct.data {
17193            let val = buf.get_u8();
17194            *v = val;
17195        }
17196        Ok(__struct)
17197    }
17198    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17199        let mut __tmp = BytesMut::new(bytes);
17200        #[allow(clippy::absurd_extreme_comparisons)]
17201        #[allow(unused_comparisons)]
17202        if __tmp.remaining() < Self::ENCODED_LEN {
17203            panic!(
17204                "buffer is too small (need {} bytes, but got {})",
17205                Self::ENCODED_LEN,
17206                __tmp.remaining(),
17207            )
17208        }
17209        __tmp.put_u16_le(self.seqnr);
17210        for val in &self.data {
17211            __tmp.put_u8(*val);
17212        }
17213        if matches!(version, MavlinkVersion::V2) {
17214            let len = __tmp.len();
17215            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17216        } else {
17217            __tmp.len()
17218        }
17219    }
17220}
17221#[doc = "id: 350"]
17222#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
17223#[derive(Debug, Clone, PartialEq)]
17224#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17225#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17226pub struct DEBUG_FLOAT_ARRAY_DATA {
17227    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17228    pub time_usec: u64,
17229    #[doc = "Unique ID used to discriminate between arrays"]
17230    pub array_id: u16,
17231    #[doc = "Name, for human-friendly display in a Ground Control Station"]
17232    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17233    pub name: [u8; 10],
17234    #[doc = "data"]
17235    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17236    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17237    pub data: [f32; 58],
17238}
17239impl DEBUG_FLOAT_ARRAY_DATA {
17240    pub const ENCODED_LEN: usize = 252usize;
17241    pub const DEFAULT: Self = Self {
17242        time_usec: 0_u64,
17243        array_id: 0_u16,
17244        name: [0_u8; 10usize],
17245        data: [0.0_f32; 58usize],
17246    };
17247    #[cfg(feature = "arbitrary")]
17248    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17249        use arbitrary::{Arbitrary, Unstructured};
17250        let mut buf = [0u8; 1024];
17251        rng.fill_bytes(&mut buf);
17252        let mut unstructured = Unstructured::new(&buf);
17253        Self::arbitrary(&mut unstructured).unwrap_or_default()
17254    }
17255}
17256impl Default for DEBUG_FLOAT_ARRAY_DATA {
17257    fn default() -> Self {
17258        Self::DEFAULT.clone()
17259    }
17260}
17261impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
17262    type Message = MavMessage;
17263    const ID: u32 = 350u32;
17264    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
17265    const EXTRA_CRC: u8 = 232u8;
17266    const ENCODED_LEN: usize = 252usize;
17267    fn deser(
17268        _version: MavlinkVersion,
17269        __input: &[u8],
17270    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17271        let avail_len = __input.len();
17272        let mut payload_buf = [0; Self::ENCODED_LEN];
17273        let mut buf = if avail_len < Self::ENCODED_LEN {
17274            payload_buf[0..avail_len].copy_from_slice(__input);
17275            Bytes::new(&payload_buf)
17276        } else {
17277            Bytes::new(__input)
17278        };
17279        let mut __struct = Self::default();
17280        __struct.time_usec = buf.get_u64_le();
17281        __struct.array_id = buf.get_u16_le();
17282        for v in &mut __struct.name {
17283            let val = buf.get_u8();
17284            *v = val;
17285        }
17286        for v in &mut __struct.data {
17287            let val = buf.get_f32_le();
17288            *v = val;
17289        }
17290        Ok(__struct)
17291    }
17292    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17293        let mut __tmp = BytesMut::new(bytes);
17294        #[allow(clippy::absurd_extreme_comparisons)]
17295        #[allow(unused_comparisons)]
17296        if __tmp.remaining() < Self::ENCODED_LEN {
17297            panic!(
17298                "buffer is too small (need {} bytes, but got {})",
17299                Self::ENCODED_LEN,
17300                __tmp.remaining(),
17301            )
17302        }
17303        __tmp.put_u64_le(self.time_usec);
17304        __tmp.put_u16_le(self.array_id);
17305        for val in &self.name {
17306            __tmp.put_u8(*val);
17307        }
17308        for val in &self.data {
17309            __tmp.put_f32_le(*val);
17310        }
17311        if matches!(version, MavlinkVersion::V2) {
17312            let len = __tmp.len();
17313            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17314        } else {
17315            __tmp.len()
17316        }
17317    }
17318}
17319#[doc = "id: 246"]
17320#[doc = "The location and information of an ADSB vehicle."]
17321#[derive(Debug, Clone, PartialEq)]
17322#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17323#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17324pub struct ADSB_VEHICLE_DATA {
17325    #[doc = "ICAO address"]
17326    pub ICAO_address: u32,
17327    #[doc = "Latitude"]
17328    pub lat: i32,
17329    #[doc = "Longitude"]
17330    pub lon: i32,
17331    #[doc = "Altitude(ASL)"]
17332    pub altitude: i32,
17333    #[doc = "Course over ground"]
17334    pub heading: u16,
17335    #[doc = "The horizontal velocity"]
17336    pub hor_velocity: u16,
17337    #[doc = "The vertical velocity. Positive is up"]
17338    pub ver_velocity: i16,
17339    #[doc = "Bitmap to indicate various statuses including valid data fields"]
17340    pub flags: AdsbFlags,
17341    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
17342    pub squawk: u16,
17343    #[doc = "ADSB altitude type."]
17344    pub altitude_type: AdsbAltitudeType,
17345    #[doc = "The callsign, 8+null"]
17346    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17347    pub callsign: [u8; 9],
17348    #[doc = "ADSB emitter type."]
17349    pub emitter_type: AdsbEmitterType,
17350    #[doc = "Time since last communication in seconds"]
17351    pub tslc: u8,
17352}
17353impl ADSB_VEHICLE_DATA {
17354    pub const ENCODED_LEN: usize = 38usize;
17355    pub const DEFAULT: Self = Self {
17356        ICAO_address: 0_u32,
17357        lat: 0_i32,
17358        lon: 0_i32,
17359        altitude: 0_i32,
17360        heading: 0_u16,
17361        hor_velocity: 0_u16,
17362        ver_velocity: 0_i16,
17363        flags: AdsbFlags::DEFAULT,
17364        squawk: 0_u16,
17365        altitude_type: AdsbAltitudeType::DEFAULT,
17366        callsign: [0_u8; 9usize],
17367        emitter_type: AdsbEmitterType::DEFAULT,
17368        tslc: 0_u8,
17369    };
17370    #[cfg(feature = "arbitrary")]
17371    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17372        use arbitrary::{Arbitrary, Unstructured};
17373        let mut buf = [0u8; 1024];
17374        rng.fill_bytes(&mut buf);
17375        let mut unstructured = Unstructured::new(&buf);
17376        Self::arbitrary(&mut unstructured).unwrap_or_default()
17377    }
17378}
17379impl Default for ADSB_VEHICLE_DATA {
17380    fn default() -> Self {
17381        Self::DEFAULT.clone()
17382    }
17383}
17384impl MessageData for ADSB_VEHICLE_DATA {
17385    type Message = MavMessage;
17386    const ID: u32 = 246u32;
17387    const NAME: &'static str = "ADSB_VEHICLE";
17388    const EXTRA_CRC: u8 = 184u8;
17389    const ENCODED_LEN: usize = 38usize;
17390    fn deser(
17391        _version: MavlinkVersion,
17392        __input: &[u8],
17393    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17394        let avail_len = __input.len();
17395        let mut payload_buf = [0; Self::ENCODED_LEN];
17396        let mut buf = if avail_len < Self::ENCODED_LEN {
17397            payload_buf[0..avail_len].copy_from_slice(__input);
17398            Bytes::new(&payload_buf)
17399        } else {
17400            Bytes::new(__input)
17401        };
17402        let mut __struct = Self::default();
17403        __struct.ICAO_address = buf.get_u32_le();
17404        __struct.lat = buf.get_i32_le();
17405        __struct.lon = buf.get_i32_le();
17406        __struct.altitude = buf.get_i32_le();
17407        __struct.heading = buf.get_u16_le();
17408        __struct.hor_velocity = buf.get_u16_le();
17409        __struct.ver_velocity = buf.get_i16_le();
17410        let tmp = buf.get_u16_le();
17411        __struct.flags = AdsbFlags::from_bits(tmp & AdsbFlags::all().bits()).ok_or(
17412            ::mavlink_core::error::ParserError::InvalidFlag {
17413                flag_type: "AdsbFlags",
17414                value: tmp as u32,
17415            },
17416        )?;
17417        __struct.squawk = buf.get_u16_le();
17418        let tmp = buf.get_u8();
17419        __struct.altitude_type =
17420            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17421                enum_type: "AdsbAltitudeType",
17422                value: tmp as u32,
17423            })?;
17424        for v in &mut __struct.callsign {
17425            let val = buf.get_u8();
17426            *v = val;
17427        }
17428        let tmp = buf.get_u8();
17429        __struct.emitter_type =
17430            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17431                enum_type: "AdsbEmitterType",
17432                value: tmp as u32,
17433            })?;
17434        __struct.tslc = buf.get_u8();
17435        Ok(__struct)
17436    }
17437    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17438        let mut __tmp = BytesMut::new(bytes);
17439        #[allow(clippy::absurd_extreme_comparisons)]
17440        #[allow(unused_comparisons)]
17441        if __tmp.remaining() < Self::ENCODED_LEN {
17442            panic!(
17443                "buffer is too small (need {} bytes, but got {})",
17444                Self::ENCODED_LEN,
17445                __tmp.remaining(),
17446            )
17447        }
17448        __tmp.put_u32_le(self.ICAO_address);
17449        __tmp.put_i32_le(self.lat);
17450        __tmp.put_i32_le(self.lon);
17451        __tmp.put_i32_le(self.altitude);
17452        __tmp.put_u16_le(self.heading);
17453        __tmp.put_u16_le(self.hor_velocity);
17454        __tmp.put_i16_le(self.ver_velocity);
17455        __tmp.put_u16_le(self.flags.bits());
17456        __tmp.put_u16_le(self.squawk);
17457        __tmp.put_u8(self.altitude_type as u8);
17458        for val in &self.callsign {
17459            __tmp.put_u8(*val);
17460        }
17461        __tmp.put_u8(self.emitter_type as u8);
17462        __tmp.put_u8(self.tslc);
17463        if matches!(version, MavlinkVersion::V2) {
17464            let len = __tmp.len();
17465            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17466        } else {
17467            __tmp.len()
17468        }
17469    }
17470}
17471#[doc = "id: 250"]
17472#[doc = "To debug something using a named 3D vector."]
17473#[derive(Debug, Clone, PartialEq)]
17474#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17475#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17476pub struct DEBUG_VECT_DATA {
17477    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17478    pub time_usec: u64,
17479    #[doc = "x"]
17480    pub x: f32,
17481    #[doc = "y"]
17482    pub y: f32,
17483    #[doc = "z"]
17484    pub z: f32,
17485    #[doc = "Name"]
17486    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17487    pub name: [u8; 10],
17488}
17489impl DEBUG_VECT_DATA {
17490    pub const ENCODED_LEN: usize = 30usize;
17491    pub const DEFAULT: Self = Self {
17492        time_usec: 0_u64,
17493        x: 0.0_f32,
17494        y: 0.0_f32,
17495        z: 0.0_f32,
17496        name: [0_u8; 10usize],
17497    };
17498    #[cfg(feature = "arbitrary")]
17499    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17500        use arbitrary::{Arbitrary, Unstructured};
17501        let mut buf = [0u8; 1024];
17502        rng.fill_bytes(&mut buf);
17503        let mut unstructured = Unstructured::new(&buf);
17504        Self::arbitrary(&mut unstructured).unwrap_or_default()
17505    }
17506}
17507impl Default for DEBUG_VECT_DATA {
17508    fn default() -> Self {
17509        Self::DEFAULT.clone()
17510    }
17511}
17512impl MessageData for DEBUG_VECT_DATA {
17513    type Message = MavMessage;
17514    const ID: u32 = 250u32;
17515    const NAME: &'static str = "DEBUG_VECT";
17516    const EXTRA_CRC: u8 = 49u8;
17517    const ENCODED_LEN: usize = 30usize;
17518    fn deser(
17519        _version: MavlinkVersion,
17520        __input: &[u8],
17521    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17522        let avail_len = __input.len();
17523        let mut payload_buf = [0; Self::ENCODED_LEN];
17524        let mut buf = if avail_len < Self::ENCODED_LEN {
17525            payload_buf[0..avail_len].copy_from_slice(__input);
17526            Bytes::new(&payload_buf)
17527        } else {
17528            Bytes::new(__input)
17529        };
17530        let mut __struct = Self::default();
17531        __struct.time_usec = buf.get_u64_le();
17532        __struct.x = buf.get_f32_le();
17533        __struct.y = buf.get_f32_le();
17534        __struct.z = buf.get_f32_le();
17535        for v in &mut __struct.name {
17536            let val = buf.get_u8();
17537            *v = val;
17538        }
17539        Ok(__struct)
17540    }
17541    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17542        let mut __tmp = BytesMut::new(bytes);
17543        #[allow(clippy::absurd_extreme_comparisons)]
17544        #[allow(unused_comparisons)]
17545        if __tmp.remaining() < Self::ENCODED_LEN {
17546            panic!(
17547                "buffer is too small (need {} bytes, but got {})",
17548                Self::ENCODED_LEN,
17549                __tmp.remaining(),
17550            )
17551        }
17552        __tmp.put_u64_le(self.time_usec);
17553        __tmp.put_f32_le(self.x);
17554        __tmp.put_f32_le(self.y);
17555        __tmp.put_f32_le(self.z);
17556        for val in &self.name {
17557            __tmp.put_u8(*val);
17558        }
17559        if matches!(version, MavlinkVersion::V2) {
17560            let len = __tmp.len();
17561            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17562        } else {
17563            __tmp.len()
17564        }
17565    }
17566}
17567#[doc = "id: 299"]
17568#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
17569#[derive(Debug, Clone, PartialEq)]
17570#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17571#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17572pub struct WIFI_CONFIG_AP_DATA {
17573    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
17574    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17575    pub ssid: [u8; 32],
17576    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
17577    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17578    pub password: [u8; 64],
17579    #[doc = "WiFi Mode."]
17580    #[cfg_attr(feature = "serde", serde(default))]
17581    pub mode: WifiConfigApMode,
17582    #[doc = "Message acceptance response (sent back to GS)."]
17583    #[cfg_attr(feature = "serde", serde(default))]
17584    pub response: WifiConfigApResponse,
17585}
17586impl WIFI_CONFIG_AP_DATA {
17587    pub const ENCODED_LEN: usize = 98usize;
17588    pub const DEFAULT: Self = Self {
17589        ssid: [0_u8; 32usize],
17590        password: [0_u8; 64usize],
17591        mode: WifiConfigApMode::DEFAULT,
17592        response: WifiConfigApResponse::DEFAULT,
17593    };
17594    #[cfg(feature = "arbitrary")]
17595    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17596        use arbitrary::{Arbitrary, Unstructured};
17597        let mut buf = [0u8; 1024];
17598        rng.fill_bytes(&mut buf);
17599        let mut unstructured = Unstructured::new(&buf);
17600        Self::arbitrary(&mut unstructured).unwrap_or_default()
17601    }
17602}
17603impl Default for WIFI_CONFIG_AP_DATA {
17604    fn default() -> Self {
17605        Self::DEFAULT.clone()
17606    }
17607}
17608impl MessageData for WIFI_CONFIG_AP_DATA {
17609    type Message = MavMessage;
17610    const ID: u32 = 299u32;
17611    const NAME: &'static str = "WIFI_CONFIG_AP";
17612    const EXTRA_CRC: u8 = 19u8;
17613    const ENCODED_LEN: usize = 98usize;
17614    fn deser(
17615        _version: MavlinkVersion,
17616        __input: &[u8],
17617    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17618        let avail_len = __input.len();
17619        let mut payload_buf = [0; Self::ENCODED_LEN];
17620        let mut buf = if avail_len < Self::ENCODED_LEN {
17621            payload_buf[0..avail_len].copy_from_slice(__input);
17622            Bytes::new(&payload_buf)
17623        } else {
17624            Bytes::new(__input)
17625        };
17626        let mut __struct = Self::default();
17627        for v in &mut __struct.ssid {
17628            let val = buf.get_u8();
17629            *v = val;
17630        }
17631        for v in &mut __struct.password {
17632            let val = buf.get_u8();
17633            *v = val;
17634        }
17635        let tmp = buf.get_i8();
17636        __struct.mode =
17637            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17638                enum_type: "WifiConfigApMode",
17639                value: tmp as u32,
17640            })?;
17641        let tmp = buf.get_i8();
17642        __struct.response =
17643            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17644                enum_type: "WifiConfigApResponse",
17645                value: tmp as u32,
17646            })?;
17647        Ok(__struct)
17648    }
17649    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17650        let mut __tmp = BytesMut::new(bytes);
17651        #[allow(clippy::absurd_extreme_comparisons)]
17652        #[allow(unused_comparisons)]
17653        if __tmp.remaining() < Self::ENCODED_LEN {
17654            panic!(
17655                "buffer is too small (need {} bytes, but got {})",
17656                Self::ENCODED_LEN,
17657                __tmp.remaining(),
17658            )
17659        }
17660        for val in &self.ssid {
17661            __tmp.put_u8(*val);
17662        }
17663        for val in &self.password {
17664            __tmp.put_u8(*val);
17665        }
17666        __tmp.put_i8(self.mode as i8);
17667        __tmp.put_i8(self.response as i8);
17668        if matches!(version, MavlinkVersion::V2) {
17669            let len = __tmp.len();
17670            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17671        } else {
17672            __tmp.len()
17673        }
17674    }
17675}
17676#[doc = "id: 372"]
17677#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
17678#[derive(Debug, Clone, PartialEq)]
17679#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17680#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17681pub struct BATTERY_INFO_DATA {
17682    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
17683    pub discharge_minimum_voltage: f32,
17684    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
17685    pub charging_minimum_voltage: f32,
17686    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
17687    pub resting_minimum_voltage: f32,
17688    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
17689    pub charging_maximum_voltage: f32,
17690    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
17691    pub charging_maximum_current: f32,
17692    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
17693    pub nominal_voltage: f32,
17694    #[doc = "Maximum pack discharge current. 0: field not provided."]
17695    pub discharge_maximum_current: f32,
17696    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
17697    pub discharge_maximum_burst_current: f32,
17698    #[doc = "Fully charged design capacity. 0: field not provided."]
17699    pub design_capacity: f32,
17700    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
17701    pub full_charge_capacity: f32,
17702    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
17703    pub cycle_count: u16,
17704    #[doc = "Battery weight. 0: field not provided."]
17705    pub weight: u16,
17706    #[doc = "Battery ID"]
17707    pub id: u8,
17708    #[doc = "Function of the battery."]
17709    pub battery_function: MavBatteryFunction,
17710    #[doc = "Type (chemistry) of the battery."]
17711    pub mavtype: MavBatteryType,
17712    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
17713    pub state_of_health: u8,
17714    #[doc = "Number of battery cells in series. 0: field not provided."]
17715    pub cells_in_series: u8,
17716    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
17717    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17718    pub manufacture_date: [u8; 9],
17719    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
17720    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17721    pub serial_number: [u8; 32],
17722    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
17723    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17724    pub name: [u8; 50],
17725}
17726impl BATTERY_INFO_DATA {
17727    pub const ENCODED_LEN: usize = 140usize;
17728    pub const DEFAULT: Self = Self {
17729        discharge_minimum_voltage: 0.0_f32,
17730        charging_minimum_voltage: 0.0_f32,
17731        resting_minimum_voltage: 0.0_f32,
17732        charging_maximum_voltage: 0.0_f32,
17733        charging_maximum_current: 0.0_f32,
17734        nominal_voltage: 0.0_f32,
17735        discharge_maximum_current: 0.0_f32,
17736        discharge_maximum_burst_current: 0.0_f32,
17737        design_capacity: 0.0_f32,
17738        full_charge_capacity: 0.0_f32,
17739        cycle_count: 0_u16,
17740        weight: 0_u16,
17741        id: 0_u8,
17742        battery_function: MavBatteryFunction::DEFAULT,
17743        mavtype: MavBatteryType::DEFAULT,
17744        state_of_health: 0_u8,
17745        cells_in_series: 0_u8,
17746        manufacture_date: [0_u8; 9usize],
17747        serial_number: [0_u8; 32usize],
17748        name: [0_u8; 50usize],
17749    };
17750    #[cfg(feature = "arbitrary")]
17751    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17752        use arbitrary::{Arbitrary, Unstructured};
17753        let mut buf = [0u8; 1024];
17754        rng.fill_bytes(&mut buf);
17755        let mut unstructured = Unstructured::new(&buf);
17756        Self::arbitrary(&mut unstructured).unwrap_or_default()
17757    }
17758}
17759impl Default for BATTERY_INFO_DATA {
17760    fn default() -> Self {
17761        Self::DEFAULT.clone()
17762    }
17763}
17764impl MessageData for BATTERY_INFO_DATA {
17765    type Message = MavMessage;
17766    const ID: u32 = 372u32;
17767    const NAME: &'static str = "BATTERY_INFO";
17768    const EXTRA_CRC: u8 = 26u8;
17769    const ENCODED_LEN: usize = 140usize;
17770    fn deser(
17771        _version: MavlinkVersion,
17772        __input: &[u8],
17773    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17774        let avail_len = __input.len();
17775        let mut payload_buf = [0; Self::ENCODED_LEN];
17776        let mut buf = if avail_len < Self::ENCODED_LEN {
17777            payload_buf[0..avail_len].copy_from_slice(__input);
17778            Bytes::new(&payload_buf)
17779        } else {
17780            Bytes::new(__input)
17781        };
17782        let mut __struct = Self::default();
17783        __struct.discharge_minimum_voltage = buf.get_f32_le();
17784        __struct.charging_minimum_voltage = buf.get_f32_le();
17785        __struct.resting_minimum_voltage = buf.get_f32_le();
17786        __struct.charging_maximum_voltage = buf.get_f32_le();
17787        __struct.charging_maximum_current = buf.get_f32_le();
17788        __struct.nominal_voltage = buf.get_f32_le();
17789        __struct.discharge_maximum_current = buf.get_f32_le();
17790        __struct.discharge_maximum_burst_current = buf.get_f32_le();
17791        __struct.design_capacity = buf.get_f32_le();
17792        __struct.full_charge_capacity = buf.get_f32_le();
17793        __struct.cycle_count = buf.get_u16_le();
17794        __struct.weight = buf.get_u16_le();
17795        __struct.id = buf.get_u8();
17796        let tmp = buf.get_u8();
17797        __struct.battery_function =
17798            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17799                enum_type: "MavBatteryFunction",
17800                value: tmp as u32,
17801            })?;
17802        let tmp = buf.get_u8();
17803        __struct.mavtype =
17804            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17805                enum_type: "MavBatteryType",
17806                value: tmp as u32,
17807            })?;
17808        __struct.state_of_health = buf.get_u8();
17809        __struct.cells_in_series = buf.get_u8();
17810        for v in &mut __struct.manufacture_date {
17811            let val = buf.get_u8();
17812            *v = val;
17813        }
17814        for v in &mut __struct.serial_number {
17815            let val = buf.get_u8();
17816            *v = val;
17817        }
17818        for v in &mut __struct.name {
17819            let val = buf.get_u8();
17820            *v = val;
17821        }
17822        Ok(__struct)
17823    }
17824    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17825        let mut __tmp = BytesMut::new(bytes);
17826        #[allow(clippy::absurd_extreme_comparisons)]
17827        #[allow(unused_comparisons)]
17828        if __tmp.remaining() < Self::ENCODED_LEN {
17829            panic!(
17830                "buffer is too small (need {} bytes, but got {})",
17831                Self::ENCODED_LEN,
17832                __tmp.remaining(),
17833            )
17834        }
17835        __tmp.put_f32_le(self.discharge_minimum_voltage);
17836        __tmp.put_f32_le(self.charging_minimum_voltage);
17837        __tmp.put_f32_le(self.resting_minimum_voltage);
17838        __tmp.put_f32_le(self.charging_maximum_voltage);
17839        __tmp.put_f32_le(self.charging_maximum_current);
17840        __tmp.put_f32_le(self.nominal_voltage);
17841        __tmp.put_f32_le(self.discharge_maximum_current);
17842        __tmp.put_f32_le(self.discharge_maximum_burst_current);
17843        __tmp.put_f32_le(self.design_capacity);
17844        __tmp.put_f32_le(self.full_charge_capacity);
17845        __tmp.put_u16_le(self.cycle_count);
17846        __tmp.put_u16_le(self.weight);
17847        __tmp.put_u8(self.id);
17848        __tmp.put_u8(self.battery_function as u8);
17849        __tmp.put_u8(self.mavtype as u8);
17850        __tmp.put_u8(self.state_of_health);
17851        __tmp.put_u8(self.cells_in_series);
17852        for val in &self.manufacture_date {
17853            __tmp.put_u8(*val);
17854        }
17855        for val in &self.serial_number {
17856            __tmp.put_u8(*val);
17857        }
17858        for val in &self.name {
17859            __tmp.put_u8(*val);
17860        }
17861        if matches!(version, MavlinkVersion::V2) {
17862            let len = __tmp.len();
17863            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17864        } else {
17865            __tmp.len()
17866        }
17867    }
17868}
17869#[doc = "id: 386"]
17870#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
17871#[derive(Debug, Clone, PartialEq)]
17872#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17873#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17874pub struct CAN_FRAME_DATA {
17875    #[doc = "Frame ID"]
17876    pub id: u32,
17877    #[doc = "System ID."]
17878    pub target_system: u8,
17879    #[doc = "Component ID."]
17880    pub target_component: u8,
17881    #[doc = "Bus number"]
17882    pub bus: u8,
17883    #[doc = "Frame length"]
17884    pub len: u8,
17885    #[doc = "Frame data"]
17886    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17887    pub data: [u8; 8],
17888}
17889impl CAN_FRAME_DATA {
17890    pub const ENCODED_LEN: usize = 16usize;
17891    pub const DEFAULT: Self = Self {
17892        id: 0_u32,
17893        target_system: 0_u8,
17894        target_component: 0_u8,
17895        bus: 0_u8,
17896        len: 0_u8,
17897        data: [0_u8; 8usize],
17898    };
17899    #[cfg(feature = "arbitrary")]
17900    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17901        use arbitrary::{Arbitrary, Unstructured};
17902        let mut buf = [0u8; 1024];
17903        rng.fill_bytes(&mut buf);
17904        let mut unstructured = Unstructured::new(&buf);
17905        Self::arbitrary(&mut unstructured).unwrap_or_default()
17906    }
17907}
17908impl Default for CAN_FRAME_DATA {
17909    fn default() -> Self {
17910        Self::DEFAULT.clone()
17911    }
17912}
17913impl MessageData for CAN_FRAME_DATA {
17914    type Message = MavMessage;
17915    const ID: u32 = 386u32;
17916    const NAME: &'static str = "CAN_FRAME";
17917    const EXTRA_CRC: u8 = 132u8;
17918    const ENCODED_LEN: usize = 16usize;
17919    fn deser(
17920        _version: MavlinkVersion,
17921        __input: &[u8],
17922    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17923        let avail_len = __input.len();
17924        let mut payload_buf = [0; Self::ENCODED_LEN];
17925        let mut buf = if avail_len < Self::ENCODED_LEN {
17926            payload_buf[0..avail_len].copy_from_slice(__input);
17927            Bytes::new(&payload_buf)
17928        } else {
17929            Bytes::new(__input)
17930        };
17931        let mut __struct = Self::default();
17932        __struct.id = buf.get_u32_le();
17933        __struct.target_system = buf.get_u8();
17934        __struct.target_component = buf.get_u8();
17935        __struct.bus = buf.get_u8();
17936        __struct.len = buf.get_u8();
17937        for v in &mut __struct.data {
17938            let val = buf.get_u8();
17939            *v = val;
17940        }
17941        Ok(__struct)
17942    }
17943    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17944        let mut __tmp = BytesMut::new(bytes);
17945        #[allow(clippy::absurd_extreme_comparisons)]
17946        #[allow(unused_comparisons)]
17947        if __tmp.remaining() < Self::ENCODED_LEN {
17948            panic!(
17949                "buffer is too small (need {} bytes, but got {})",
17950                Self::ENCODED_LEN,
17951                __tmp.remaining(),
17952            )
17953        }
17954        __tmp.put_u32_le(self.id);
17955        __tmp.put_u8(self.target_system);
17956        __tmp.put_u8(self.target_component);
17957        __tmp.put_u8(self.bus);
17958        __tmp.put_u8(self.len);
17959        for val in &self.data {
17960            __tmp.put_u8(*val);
17961        }
17962        if matches!(version, MavlinkVersion::V2) {
17963            let len = __tmp.len();
17964            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17965        } else {
17966            __tmp.len()
17967        }
17968    }
17969}
17970#[doc = "id: 233"]
17971#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
17972#[derive(Debug, Clone, PartialEq)]
17973#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17974#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17975pub struct GPS_RTCM_DATA_DATA {
17976    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
17977    pub flags: u8,
17978    #[doc = "data length"]
17979    pub len: u8,
17980    #[doc = "RTCM message (may be fragmented)"]
17981    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17982    pub data: [u8; 180],
17983}
17984impl GPS_RTCM_DATA_DATA {
17985    pub const ENCODED_LEN: usize = 182usize;
17986    pub const DEFAULT: Self = Self {
17987        flags: 0_u8,
17988        len: 0_u8,
17989        data: [0_u8; 180usize],
17990    };
17991    #[cfg(feature = "arbitrary")]
17992    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17993        use arbitrary::{Arbitrary, Unstructured};
17994        let mut buf = [0u8; 1024];
17995        rng.fill_bytes(&mut buf);
17996        let mut unstructured = Unstructured::new(&buf);
17997        Self::arbitrary(&mut unstructured).unwrap_or_default()
17998    }
17999}
18000impl Default for GPS_RTCM_DATA_DATA {
18001    fn default() -> Self {
18002        Self::DEFAULT.clone()
18003    }
18004}
18005impl MessageData for GPS_RTCM_DATA_DATA {
18006    type Message = MavMessage;
18007    const ID: u32 = 233u32;
18008    const NAME: &'static str = "GPS_RTCM_DATA";
18009    const EXTRA_CRC: u8 = 35u8;
18010    const ENCODED_LEN: usize = 182usize;
18011    fn deser(
18012        _version: MavlinkVersion,
18013        __input: &[u8],
18014    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18015        let avail_len = __input.len();
18016        let mut payload_buf = [0; Self::ENCODED_LEN];
18017        let mut buf = if avail_len < Self::ENCODED_LEN {
18018            payload_buf[0..avail_len].copy_from_slice(__input);
18019            Bytes::new(&payload_buf)
18020        } else {
18021            Bytes::new(__input)
18022        };
18023        let mut __struct = Self::default();
18024        __struct.flags = buf.get_u8();
18025        __struct.len = buf.get_u8();
18026        for v in &mut __struct.data {
18027            let val = buf.get_u8();
18028            *v = val;
18029        }
18030        Ok(__struct)
18031    }
18032    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18033        let mut __tmp = BytesMut::new(bytes);
18034        #[allow(clippy::absurd_extreme_comparisons)]
18035        #[allow(unused_comparisons)]
18036        if __tmp.remaining() < Self::ENCODED_LEN {
18037            panic!(
18038                "buffer is too small (need {} bytes, but got {})",
18039                Self::ENCODED_LEN,
18040                __tmp.remaining(),
18041            )
18042        }
18043        __tmp.put_u8(self.flags);
18044        __tmp.put_u8(self.len);
18045        for val in &self.data {
18046            __tmp.put_u8(*val);
18047        }
18048        if matches!(version, MavlinkVersion::V2) {
18049            let len = __tmp.len();
18050            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18051        } else {
18052            __tmp.len()
18053        }
18054    }
18055}
18056#[doc = "id: 300"]
18057#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
18058#[derive(Debug, Clone, PartialEq)]
18059#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18060#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18061pub struct PROTOCOL_VERSION_DATA {
18062    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
18063    pub version: u16,
18064    #[doc = "Minimum MAVLink version supported"]
18065    pub min_version: u16,
18066    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
18067    pub max_version: u16,
18068    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
18069    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18070    pub spec_version_hash: [u8; 8],
18071    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
18072    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18073    pub library_version_hash: [u8; 8],
18074}
18075impl PROTOCOL_VERSION_DATA {
18076    pub const ENCODED_LEN: usize = 22usize;
18077    pub const DEFAULT: Self = Self {
18078        version: 0_u16,
18079        min_version: 0_u16,
18080        max_version: 0_u16,
18081        spec_version_hash: [0_u8; 8usize],
18082        library_version_hash: [0_u8; 8usize],
18083    };
18084    #[cfg(feature = "arbitrary")]
18085    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18086        use arbitrary::{Arbitrary, Unstructured};
18087        let mut buf = [0u8; 1024];
18088        rng.fill_bytes(&mut buf);
18089        let mut unstructured = Unstructured::new(&buf);
18090        Self::arbitrary(&mut unstructured).unwrap_or_default()
18091    }
18092}
18093impl Default for PROTOCOL_VERSION_DATA {
18094    fn default() -> Self {
18095        Self::DEFAULT.clone()
18096    }
18097}
18098impl MessageData for PROTOCOL_VERSION_DATA {
18099    type Message = MavMessage;
18100    const ID: u32 = 300u32;
18101    const NAME: &'static str = "PROTOCOL_VERSION";
18102    const EXTRA_CRC: u8 = 217u8;
18103    const ENCODED_LEN: usize = 22usize;
18104    fn deser(
18105        _version: MavlinkVersion,
18106        __input: &[u8],
18107    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18108        let avail_len = __input.len();
18109        let mut payload_buf = [0; Self::ENCODED_LEN];
18110        let mut buf = if avail_len < Self::ENCODED_LEN {
18111            payload_buf[0..avail_len].copy_from_slice(__input);
18112            Bytes::new(&payload_buf)
18113        } else {
18114            Bytes::new(__input)
18115        };
18116        let mut __struct = Self::default();
18117        __struct.version = buf.get_u16_le();
18118        __struct.min_version = buf.get_u16_le();
18119        __struct.max_version = buf.get_u16_le();
18120        for v in &mut __struct.spec_version_hash {
18121            let val = buf.get_u8();
18122            *v = val;
18123        }
18124        for v in &mut __struct.library_version_hash {
18125            let val = buf.get_u8();
18126            *v = val;
18127        }
18128        Ok(__struct)
18129    }
18130    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18131        let mut __tmp = BytesMut::new(bytes);
18132        #[allow(clippy::absurd_extreme_comparisons)]
18133        #[allow(unused_comparisons)]
18134        if __tmp.remaining() < Self::ENCODED_LEN {
18135            panic!(
18136                "buffer is too small (need {} bytes, but got {})",
18137                Self::ENCODED_LEN,
18138                __tmp.remaining(),
18139            )
18140        }
18141        __tmp.put_u16_le(self.version);
18142        __tmp.put_u16_le(self.min_version);
18143        __tmp.put_u16_le(self.max_version);
18144        for val in &self.spec_version_hash {
18145            __tmp.put_u8(*val);
18146        }
18147        for val in &self.library_version_hash {
18148            __tmp.put_u8(*val);
18149        }
18150        if matches!(version, MavlinkVersion::V2) {
18151            let len = __tmp.len();
18152            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18153        } else {
18154            __tmp.len()
18155        }
18156    }
18157}
18158#[doc = "id: 144"]
18159#[doc = "Current motion information from a designated system."]
18160#[derive(Debug, Clone, PartialEq)]
18161#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18162#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18163pub struct FOLLOW_TARGET_DATA {
18164    #[doc = "Timestamp (time since system boot)."]
18165    pub timestamp: u64,
18166    #[doc = "button states or switches of a tracker device"]
18167    pub custom_state: u64,
18168    #[doc = "Latitude (WGS84)"]
18169    pub lat: i32,
18170    #[doc = "Longitude (WGS84)"]
18171    pub lon: i32,
18172    #[doc = "Altitude (MSL)"]
18173    pub alt: f32,
18174    #[doc = "target velocity (0,0,0) for unknown"]
18175    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18176    pub vel: [f32; 3],
18177    #[doc = "linear target acceleration (0,0,0) for unknown"]
18178    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18179    pub acc: [f32; 3],
18180    #[doc = "(0 0 0 0 for unknown)"]
18181    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18182    pub attitude_q: [f32; 4],
18183    #[doc = "(0 0 0 for unknown)"]
18184    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18185    pub rates: [f32; 3],
18186    #[doc = "eph epv"]
18187    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18188    pub position_cov: [f32; 3],
18189    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
18190    pub est_capabilities: u8,
18191}
18192impl FOLLOW_TARGET_DATA {
18193    pub const ENCODED_LEN: usize = 93usize;
18194    pub const DEFAULT: Self = Self {
18195        timestamp: 0_u64,
18196        custom_state: 0_u64,
18197        lat: 0_i32,
18198        lon: 0_i32,
18199        alt: 0.0_f32,
18200        vel: [0.0_f32; 3usize],
18201        acc: [0.0_f32; 3usize],
18202        attitude_q: [0.0_f32; 4usize],
18203        rates: [0.0_f32; 3usize],
18204        position_cov: [0.0_f32; 3usize],
18205        est_capabilities: 0_u8,
18206    };
18207    #[cfg(feature = "arbitrary")]
18208    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18209        use arbitrary::{Arbitrary, Unstructured};
18210        let mut buf = [0u8; 1024];
18211        rng.fill_bytes(&mut buf);
18212        let mut unstructured = Unstructured::new(&buf);
18213        Self::arbitrary(&mut unstructured).unwrap_or_default()
18214    }
18215}
18216impl Default for FOLLOW_TARGET_DATA {
18217    fn default() -> Self {
18218        Self::DEFAULT.clone()
18219    }
18220}
18221impl MessageData for FOLLOW_TARGET_DATA {
18222    type Message = MavMessage;
18223    const ID: u32 = 144u32;
18224    const NAME: &'static str = "FOLLOW_TARGET";
18225    const EXTRA_CRC: u8 = 127u8;
18226    const ENCODED_LEN: usize = 93usize;
18227    fn deser(
18228        _version: MavlinkVersion,
18229        __input: &[u8],
18230    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18231        let avail_len = __input.len();
18232        let mut payload_buf = [0; Self::ENCODED_LEN];
18233        let mut buf = if avail_len < Self::ENCODED_LEN {
18234            payload_buf[0..avail_len].copy_from_slice(__input);
18235            Bytes::new(&payload_buf)
18236        } else {
18237            Bytes::new(__input)
18238        };
18239        let mut __struct = Self::default();
18240        __struct.timestamp = buf.get_u64_le();
18241        __struct.custom_state = buf.get_u64_le();
18242        __struct.lat = buf.get_i32_le();
18243        __struct.lon = buf.get_i32_le();
18244        __struct.alt = buf.get_f32_le();
18245        for v in &mut __struct.vel {
18246            let val = buf.get_f32_le();
18247            *v = val;
18248        }
18249        for v in &mut __struct.acc {
18250            let val = buf.get_f32_le();
18251            *v = val;
18252        }
18253        for v in &mut __struct.attitude_q {
18254            let val = buf.get_f32_le();
18255            *v = val;
18256        }
18257        for v in &mut __struct.rates {
18258            let val = buf.get_f32_le();
18259            *v = val;
18260        }
18261        for v in &mut __struct.position_cov {
18262            let val = buf.get_f32_le();
18263            *v = val;
18264        }
18265        __struct.est_capabilities = buf.get_u8();
18266        Ok(__struct)
18267    }
18268    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18269        let mut __tmp = BytesMut::new(bytes);
18270        #[allow(clippy::absurd_extreme_comparisons)]
18271        #[allow(unused_comparisons)]
18272        if __tmp.remaining() < Self::ENCODED_LEN {
18273            panic!(
18274                "buffer is too small (need {} bytes, but got {})",
18275                Self::ENCODED_LEN,
18276                __tmp.remaining(),
18277            )
18278        }
18279        __tmp.put_u64_le(self.timestamp);
18280        __tmp.put_u64_le(self.custom_state);
18281        __tmp.put_i32_le(self.lat);
18282        __tmp.put_i32_le(self.lon);
18283        __tmp.put_f32_le(self.alt);
18284        for val in &self.vel {
18285            __tmp.put_f32_le(*val);
18286        }
18287        for val in &self.acc {
18288            __tmp.put_f32_le(*val);
18289        }
18290        for val in &self.attitude_q {
18291            __tmp.put_f32_le(*val);
18292        }
18293        for val in &self.rates {
18294            __tmp.put_f32_le(*val);
18295        }
18296        for val in &self.position_cov {
18297            __tmp.put_f32_le(*val);
18298        }
18299        __tmp.put_u8(self.est_capabilities);
18300        if matches!(version, MavlinkVersion::V2) {
18301            let len = __tmp.len();
18302            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18303        } else {
18304            __tmp.len()
18305        }
18306    }
18307}
18308#[doc = "id: 135"]
18309#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
18310#[derive(Debug, Clone, PartialEq)]
18311#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18312#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18313pub struct TERRAIN_CHECK_DATA {
18314    #[doc = "Latitude"]
18315    pub lat: i32,
18316    #[doc = "Longitude"]
18317    pub lon: i32,
18318}
18319impl TERRAIN_CHECK_DATA {
18320    pub const ENCODED_LEN: usize = 8usize;
18321    pub const DEFAULT: Self = Self {
18322        lat: 0_i32,
18323        lon: 0_i32,
18324    };
18325    #[cfg(feature = "arbitrary")]
18326    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18327        use arbitrary::{Arbitrary, Unstructured};
18328        let mut buf = [0u8; 1024];
18329        rng.fill_bytes(&mut buf);
18330        let mut unstructured = Unstructured::new(&buf);
18331        Self::arbitrary(&mut unstructured).unwrap_or_default()
18332    }
18333}
18334impl Default for TERRAIN_CHECK_DATA {
18335    fn default() -> Self {
18336        Self::DEFAULT.clone()
18337    }
18338}
18339impl MessageData for TERRAIN_CHECK_DATA {
18340    type Message = MavMessage;
18341    const ID: u32 = 135u32;
18342    const NAME: &'static str = "TERRAIN_CHECK";
18343    const EXTRA_CRC: u8 = 203u8;
18344    const ENCODED_LEN: usize = 8usize;
18345    fn deser(
18346        _version: MavlinkVersion,
18347        __input: &[u8],
18348    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18349        let avail_len = __input.len();
18350        let mut payload_buf = [0; Self::ENCODED_LEN];
18351        let mut buf = if avail_len < Self::ENCODED_LEN {
18352            payload_buf[0..avail_len].copy_from_slice(__input);
18353            Bytes::new(&payload_buf)
18354        } else {
18355            Bytes::new(__input)
18356        };
18357        let mut __struct = Self::default();
18358        __struct.lat = buf.get_i32_le();
18359        __struct.lon = buf.get_i32_le();
18360        Ok(__struct)
18361    }
18362    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18363        let mut __tmp = BytesMut::new(bytes);
18364        #[allow(clippy::absurd_extreme_comparisons)]
18365        #[allow(unused_comparisons)]
18366        if __tmp.remaining() < Self::ENCODED_LEN {
18367            panic!(
18368                "buffer is too small (need {} bytes, but got {})",
18369                Self::ENCODED_LEN,
18370                __tmp.remaining(),
18371            )
18372        }
18373        __tmp.put_i32_le(self.lat);
18374        __tmp.put_i32_le(self.lon);
18375        if matches!(version, MavlinkVersion::V2) {
18376            let len = __tmp.len();
18377            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18378        } else {
18379            __tmp.len()
18380        }
18381    }
18382}
18383#[doc = "id: 35"]
18384#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
18385#[derive(Debug, Clone, PartialEq)]
18386#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18387#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18388pub struct RC_CHANNELS_RAW_DATA {
18389    #[doc = "Timestamp (time since system boot)."]
18390    pub time_boot_ms: u32,
18391    #[doc = "RC channel 1 value."]
18392    pub chan1_raw: u16,
18393    #[doc = "RC channel 2 value."]
18394    pub chan2_raw: u16,
18395    #[doc = "RC channel 3 value."]
18396    pub chan3_raw: u16,
18397    #[doc = "RC channel 4 value."]
18398    pub chan4_raw: u16,
18399    #[doc = "RC channel 5 value."]
18400    pub chan5_raw: u16,
18401    #[doc = "RC channel 6 value."]
18402    pub chan6_raw: u16,
18403    #[doc = "RC channel 7 value."]
18404    pub chan7_raw: u16,
18405    #[doc = "RC channel 8 value."]
18406    pub chan8_raw: u16,
18407    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
18408    pub port: u8,
18409    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
18410    pub rssi: u8,
18411}
18412impl RC_CHANNELS_RAW_DATA {
18413    pub const ENCODED_LEN: usize = 22usize;
18414    pub const DEFAULT: Self = Self {
18415        time_boot_ms: 0_u32,
18416        chan1_raw: 0_u16,
18417        chan2_raw: 0_u16,
18418        chan3_raw: 0_u16,
18419        chan4_raw: 0_u16,
18420        chan5_raw: 0_u16,
18421        chan6_raw: 0_u16,
18422        chan7_raw: 0_u16,
18423        chan8_raw: 0_u16,
18424        port: 0_u8,
18425        rssi: 0_u8,
18426    };
18427    #[cfg(feature = "arbitrary")]
18428    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18429        use arbitrary::{Arbitrary, Unstructured};
18430        let mut buf = [0u8; 1024];
18431        rng.fill_bytes(&mut buf);
18432        let mut unstructured = Unstructured::new(&buf);
18433        Self::arbitrary(&mut unstructured).unwrap_or_default()
18434    }
18435}
18436impl Default for RC_CHANNELS_RAW_DATA {
18437    fn default() -> Self {
18438        Self::DEFAULT.clone()
18439    }
18440}
18441impl MessageData for RC_CHANNELS_RAW_DATA {
18442    type Message = MavMessage;
18443    const ID: u32 = 35u32;
18444    const NAME: &'static str = "RC_CHANNELS_RAW";
18445    const EXTRA_CRC: u8 = 244u8;
18446    const ENCODED_LEN: usize = 22usize;
18447    fn deser(
18448        _version: MavlinkVersion,
18449        __input: &[u8],
18450    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18451        let avail_len = __input.len();
18452        let mut payload_buf = [0; Self::ENCODED_LEN];
18453        let mut buf = if avail_len < Self::ENCODED_LEN {
18454            payload_buf[0..avail_len].copy_from_slice(__input);
18455            Bytes::new(&payload_buf)
18456        } else {
18457            Bytes::new(__input)
18458        };
18459        let mut __struct = Self::default();
18460        __struct.time_boot_ms = buf.get_u32_le();
18461        __struct.chan1_raw = buf.get_u16_le();
18462        __struct.chan2_raw = buf.get_u16_le();
18463        __struct.chan3_raw = buf.get_u16_le();
18464        __struct.chan4_raw = buf.get_u16_le();
18465        __struct.chan5_raw = buf.get_u16_le();
18466        __struct.chan6_raw = buf.get_u16_le();
18467        __struct.chan7_raw = buf.get_u16_le();
18468        __struct.chan8_raw = buf.get_u16_le();
18469        __struct.port = buf.get_u8();
18470        __struct.rssi = buf.get_u8();
18471        Ok(__struct)
18472    }
18473    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18474        let mut __tmp = BytesMut::new(bytes);
18475        #[allow(clippy::absurd_extreme_comparisons)]
18476        #[allow(unused_comparisons)]
18477        if __tmp.remaining() < Self::ENCODED_LEN {
18478            panic!(
18479                "buffer is too small (need {} bytes, but got {})",
18480                Self::ENCODED_LEN,
18481                __tmp.remaining(),
18482            )
18483        }
18484        __tmp.put_u32_le(self.time_boot_ms);
18485        __tmp.put_u16_le(self.chan1_raw);
18486        __tmp.put_u16_le(self.chan2_raw);
18487        __tmp.put_u16_le(self.chan3_raw);
18488        __tmp.put_u16_le(self.chan4_raw);
18489        __tmp.put_u16_le(self.chan5_raw);
18490        __tmp.put_u16_le(self.chan6_raw);
18491        __tmp.put_u16_le(self.chan7_raw);
18492        __tmp.put_u16_le(self.chan8_raw);
18493        __tmp.put_u8(self.port);
18494        __tmp.put_u8(self.rssi);
18495        if matches!(version, MavlinkVersion::V2) {
18496            let len = __tmp.len();
18497            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18498        } else {
18499            __tmp.len()
18500        }
18501    }
18502}
18503#[doc = "id: 262"]
18504#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
18505#[derive(Debug, Clone, PartialEq)]
18506#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18507#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18508pub struct CAMERA_CAPTURE_STATUS_DATA {
18509    #[doc = "Timestamp (time since system boot)."]
18510    pub time_boot_ms: u32,
18511    #[doc = "Image capture interval"]
18512    pub image_interval: f32,
18513    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
18514    pub recording_time_ms: u32,
18515    #[doc = "Available storage capacity."]
18516    pub available_capacity: f32,
18517    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
18518    pub image_status: u8,
18519    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
18520    pub video_status: u8,
18521    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
18522    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18523    pub image_count: i32,
18524    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
18525    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18526    pub camera_device_id: u8,
18527}
18528impl CAMERA_CAPTURE_STATUS_DATA {
18529    pub const ENCODED_LEN: usize = 23usize;
18530    pub const DEFAULT: Self = Self {
18531        time_boot_ms: 0_u32,
18532        image_interval: 0.0_f32,
18533        recording_time_ms: 0_u32,
18534        available_capacity: 0.0_f32,
18535        image_status: 0_u8,
18536        video_status: 0_u8,
18537        image_count: 0_i32,
18538        camera_device_id: 0_u8,
18539    };
18540    #[cfg(feature = "arbitrary")]
18541    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18542        use arbitrary::{Arbitrary, Unstructured};
18543        let mut buf = [0u8; 1024];
18544        rng.fill_bytes(&mut buf);
18545        let mut unstructured = Unstructured::new(&buf);
18546        Self::arbitrary(&mut unstructured).unwrap_or_default()
18547    }
18548}
18549impl Default for CAMERA_CAPTURE_STATUS_DATA {
18550    fn default() -> Self {
18551        Self::DEFAULT.clone()
18552    }
18553}
18554impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
18555    type Message = MavMessage;
18556    const ID: u32 = 262u32;
18557    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
18558    const EXTRA_CRC: u8 = 12u8;
18559    const ENCODED_LEN: usize = 23usize;
18560    fn deser(
18561        _version: MavlinkVersion,
18562        __input: &[u8],
18563    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18564        let avail_len = __input.len();
18565        let mut payload_buf = [0; Self::ENCODED_LEN];
18566        let mut buf = if avail_len < Self::ENCODED_LEN {
18567            payload_buf[0..avail_len].copy_from_slice(__input);
18568            Bytes::new(&payload_buf)
18569        } else {
18570            Bytes::new(__input)
18571        };
18572        let mut __struct = Self::default();
18573        __struct.time_boot_ms = buf.get_u32_le();
18574        __struct.image_interval = buf.get_f32_le();
18575        __struct.recording_time_ms = buf.get_u32_le();
18576        __struct.available_capacity = buf.get_f32_le();
18577        __struct.image_status = buf.get_u8();
18578        __struct.video_status = buf.get_u8();
18579        __struct.image_count = buf.get_i32_le();
18580        __struct.camera_device_id = buf.get_u8();
18581        Ok(__struct)
18582    }
18583    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18584        let mut __tmp = BytesMut::new(bytes);
18585        #[allow(clippy::absurd_extreme_comparisons)]
18586        #[allow(unused_comparisons)]
18587        if __tmp.remaining() < Self::ENCODED_LEN {
18588            panic!(
18589                "buffer is too small (need {} bytes, but got {})",
18590                Self::ENCODED_LEN,
18591                __tmp.remaining(),
18592            )
18593        }
18594        __tmp.put_u32_le(self.time_boot_ms);
18595        __tmp.put_f32_le(self.image_interval);
18596        __tmp.put_u32_le(self.recording_time_ms);
18597        __tmp.put_f32_le(self.available_capacity);
18598        __tmp.put_u8(self.image_status);
18599        __tmp.put_u8(self.video_status);
18600        __tmp.put_i32_le(self.image_count);
18601        __tmp.put_u8(self.camera_device_id);
18602        if matches!(version, MavlinkVersion::V2) {
18603            let len = __tmp.len();
18604            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18605        } else {
18606            __tmp.len()
18607        }
18608    }
18609}
18610#[doc = "id: 12905"]
18611#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
18612#[derive(Debug, Clone, PartialEq)]
18613#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18614#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18615pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
18616    #[doc = "System ID (0 for broadcast)."]
18617    pub target_system: u8,
18618    #[doc = "Component ID (0 for broadcast)."]
18619    pub target_component: u8,
18620    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
18621    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18622    pub id_or_mac: [u8; 20],
18623    #[doc = "Indicates the type of the operator_id field."]
18624    pub operator_id_type: MavOdidOperatorIdType,
18625    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
18626    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18627    pub operator_id: [u8; 20],
18628}
18629impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
18630    pub const ENCODED_LEN: usize = 43usize;
18631    pub const DEFAULT: Self = Self {
18632        target_system: 0_u8,
18633        target_component: 0_u8,
18634        id_or_mac: [0_u8; 20usize],
18635        operator_id_type: MavOdidOperatorIdType::DEFAULT,
18636        operator_id: [0_u8; 20usize],
18637    };
18638    #[cfg(feature = "arbitrary")]
18639    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18640        use arbitrary::{Arbitrary, Unstructured};
18641        let mut buf = [0u8; 1024];
18642        rng.fill_bytes(&mut buf);
18643        let mut unstructured = Unstructured::new(&buf);
18644        Self::arbitrary(&mut unstructured).unwrap_or_default()
18645    }
18646}
18647impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
18648    fn default() -> Self {
18649        Self::DEFAULT.clone()
18650    }
18651}
18652impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
18653    type Message = MavMessage;
18654    const ID: u32 = 12905u32;
18655    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
18656    const EXTRA_CRC: u8 = 49u8;
18657    const ENCODED_LEN: usize = 43usize;
18658    fn deser(
18659        _version: MavlinkVersion,
18660        __input: &[u8],
18661    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18662        let avail_len = __input.len();
18663        let mut payload_buf = [0; Self::ENCODED_LEN];
18664        let mut buf = if avail_len < Self::ENCODED_LEN {
18665            payload_buf[0..avail_len].copy_from_slice(__input);
18666            Bytes::new(&payload_buf)
18667        } else {
18668            Bytes::new(__input)
18669        };
18670        let mut __struct = Self::default();
18671        __struct.target_system = buf.get_u8();
18672        __struct.target_component = buf.get_u8();
18673        for v in &mut __struct.id_or_mac {
18674            let val = buf.get_u8();
18675            *v = val;
18676        }
18677        let tmp = buf.get_u8();
18678        __struct.operator_id_type =
18679            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18680                enum_type: "MavOdidOperatorIdType",
18681                value: tmp as u32,
18682            })?;
18683        for v in &mut __struct.operator_id {
18684            let val = buf.get_u8();
18685            *v = val;
18686        }
18687        Ok(__struct)
18688    }
18689    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18690        let mut __tmp = BytesMut::new(bytes);
18691        #[allow(clippy::absurd_extreme_comparisons)]
18692        #[allow(unused_comparisons)]
18693        if __tmp.remaining() < Self::ENCODED_LEN {
18694            panic!(
18695                "buffer is too small (need {} bytes, but got {})",
18696                Self::ENCODED_LEN,
18697                __tmp.remaining(),
18698            )
18699        }
18700        __tmp.put_u8(self.target_system);
18701        __tmp.put_u8(self.target_component);
18702        for val in &self.id_or_mac {
18703            __tmp.put_u8(*val);
18704        }
18705        __tmp.put_u8(self.operator_id_type as u8);
18706        for val in &self.operator_id {
18707            __tmp.put_u8(*val);
18708        }
18709        if matches!(version, MavlinkVersion::V2) {
18710            let len = __tmp.len();
18711            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18712        } else {
18713            __tmp.len()
18714        }
18715    }
18716}
18717#[doc = "id: 234"]
18718#[doc = "Message appropriate for high latency connections like Iridium."]
18719#[derive(Debug, Clone, PartialEq)]
18720#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18721#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18722pub struct HIGH_LATENCY_DATA {
18723    #[doc = "A bitfield for use for autopilot-specific flags."]
18724    pub custom_mode: u32,
18725    #[doc = "Latitude"]
18726    pub latitude: i32,
18727    #[doc = "Longitude"]
18728    pub longitude: i32,
18729    #[doc = "roll"]
18730    pub roll: i16,
18731    #[doc = "pitch"]
18732    pub pitch: i16,
18733    #[doc = "heading"]
18734    pub heading: u16,
18735    #[doc = "heading setpoint"]
18736    pub heading_sp: i16,
18737    #[doc = "Altitude above mean sea level"]
18738    pub altitude_amsl: i16,
18739    #[doc = "Altitude setpoint relative to the home position"]
18740    pub altitude_sp: i16,
18741    #[doc = "distance to target"]
18742    pub wp_distance: u16,
18743    #[doc = "Bitmap of enabled system modes."]
18744    pub base_mode: MavModeFlag,
18745    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
18746    pub landed_state: MavLandedState,
18747    #[doc = "throttle (percentage)"]
18748    pub throttle: i8,
18749    #[doc = "airspeed"]
18750    pub airspeed: u8,
18751    #[doc = "airspeed setpoint"]
18752    pub airspeed_sp: u8,
18753    #[doc = "groundspeed"]
18754    pub groundspeed: u8,
18755    #[doc = "climb rate"]
18756    pub climb_rate: i8,
18757    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
18758    pub gps_nsat: u8,
18759    #[doc = "GPS Fix type."]
18760    pub gps_fix_type: GpsFixType,
18761    #[doc = "Remaining battery (percentage)"]
18762    pub battery_remaining: u8,
18763    #[doc = "Autopilot temperature (degrees C)"]
18764    pub temperature: i8,
18765    #[doc = "Air temperature (degrees C) from airspeed sensor"]
18766    pub temperature_air: i8,
18767    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
18768    pub failsafe: u8,
18769    #[doc = "current waypoint number"]
18770    pub wp_num: u8,
18771}
18772impl HIGH_LATENCY_DATA {
18773    pub const ENCODED_LEN: usize = 40usize;
18774    pub const DEFAULT: Self = Self {
18775        custom_mode: 0_u32,
18776        latitude: 0_i32,
18777        longitude: 0_i32,
18778        roll: 0_i16,
18779        pitch: 0_i16,
18780        heading: 0_u16,
18781        heading_sp: 0_i16,
18782        altitude_amsl: 0_i16,
18783        altitude_sp: 0_i16,
18784        wp_distance: 0_u16,
18785        base_mode: MavModeFlag::DEFAULT,
18786        landed_state: MavLandedState::DEFAULT,
18787        throttle: 0_i8,
18788        airspeed: 0_u8,
18789        airspeed_sp: 0_u8,
18790        groundspeed: 0_u8,
18791        climb_rate: 0_i8,
18792        gps_nsat: 0_u8,
18793        gps_fix_type: GpsFixType::DEFAULT,
18794        battery_remaining: 0_u8,
18795        temperature: 0_i8,
18796        temperature_air: 0_i8,
18797        failsafe: 0_u8,
18798        wp_num: 0_u8,
18799    };
18800    #[cfg(feature = "arbitrary")]
18801    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18802        use arbitrary::{Arbitrary, Unstructured};
18803        let mut buf = [0u8; 1024];
18804        rng.fill_bytes(&mut buf);
18805        let mut unstructured = Unstructured::new(&buf);
18806        Self::arbitrary(&mut unstructured).unwrap_or_default()
18807    }
18808}
18809impl Default for HIGH_LATENCY_DATA {
18810    fn default() -> Self {
18811        Self::DEFAULT.clone()
18812    }
18813}
18814impl MessageData for HIGH_LATENCY_DATA {
18815    type Message = MavMessage;
18816    const ID: u32 = 234u32;
18817    const NAME: &'static str = "HIGH_LATENCY";
18818    const EXTRA_CRC: u8 = 150u8;
18819    const ENCODED_LEN: usize = 40usize;
18820    fn deser(
18821        _version: MavlinkVersion,
18822        __input: &[u8],
18823    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18824        let avail_len = __input.len();
18825        let mut payload_buf = [0; Self::ENCODED_LEN];
18826        let mut buf = if avail_len < Self::ENCODED_LEN {
18827            payload_buf[0..avail_len].copy_from_slice(__input);
18828            Bytes::new(&payload_buf)
18829        } else {
18830            Bytes::new(__input)
18831        };
18832        let mut __struct = Self::default();
18833        __struct.custom_mode = buf.get_u32_le();
18834        __struct.latitude = buf.get_i32_le();
18835        __struct.longitude = buf.get_i32_le();
18836        __struct.roll = buf.get_i16_le();
18837        __struct.pitch = buf.get_i16_le();
18838        __struct.heading = buf.get_u16_le();
18839        __struct.heading_sp = buf.get_i16_le();
18840        __struct.altitude_amsl = buf.get_i16_le();
18841        __struct.altitude_sp = buf.get_i16_le();
18842        __struct.wp_distance = buf.get_u16_le();
18843        let tmp = buf.get_u8();
18844        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
18845            ::mavlink_core::error::ParserError::InvalidFlag {
18846                flag_type: "MavModeFlag",
18847                value: tmp as u32,
18848            },
18849        )?;
18850        let tmp = buf.get_u8();
18851        __struct.landed_state =
18852            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18853                enum_type: "MavLandedState",
18854                value: tmp as u32,
18855            })?;
18856        __struct.throttle = buf.get_i8();
18857        __struct.airspeed = buf.get_u8();
18858        __struct.airspeed_sp = buf.get_u8();
18859        __struct.groundspeed = buf.get_u8();
18860        __struct.climb_rate = buf.get_i8();
18861        __struct.gps_nsat = buf.get_u8();
18862        let tmp = buf.get_u8();
18863        __struct.gps_fix_type =
18864            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18865                enum_type: "GpsFixType",
18866                value: tmp as u32,
18867            })?;
18868        __struct.battery_remaining = buf.get_u8();
18869        __struct.temperature = buf.get_i8();
18870        __struct.temperature_air = buf.get_i8();
18871        __struct.failsafe = buf.get_u8();
18872        __struct.wp_num = buf.get_u8();
18873        Ok(__struct)
18874    }
18875    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18876        let mut __tmp = BytesMut::new(bytes);
18877        #[allow(clippy::absurd_extreme_comparisons)]
18878        #[allow(unused_comparisons)]
18879        if __tmp.remaining() < Self::ENCODED_LEN {
18880            panic!(
18881                "buffer is too small (need {} bytes, but got {})",
18882                Self::ENCODED_LEN,
18883                __tmp.remaining(),
18884            )
18885        }
18886        __tmp.put_u32_le(self.custom_mode);
18887        __tmp.put_i32_le(self.latitude);
18888        __tmp.put_i32_le(self.longitude);
18889        __tmp.put_i16_le(self.roll);
18890        __tmp.put_i16_le(self.pitch);
18891        __tmp.put_u16_le(self.heading);
18892        __tmp.put_i16_le(self.heading_sp);
18893        __tmp.put_i16_le(self.altitude_amsl);
18894        __tmp.put_i16_le(self.altitude_sp);
18895        __tmp.put_u16_le(self.wp_distance);
18896        __tmp.put_u8(self.base_mode.bits());
18897        __tmp.put_u8(self.landed_state as u8);
18898        __tmp.put_i8(self.throttle);
18899        __tmp.put_u8(self.airspeed);
18900        __tmp.put_u8(self.airspeed_sp);
18901        __tmp.put_u8(self.groundspeed);
18902        __tmp.put_i8(self.climb_rate);
18903        __tmp.put_u8(self.gps_nsat);
18904        __tmp.put_u8(self.gps_fix_type as u8);
18905        __tmp.put_u8(self.battery_remaining);
18906        __tmp.put_i8(self.temperature);
18907        __tmp.put_i8(self.temperature_air);
18908        __tmp.put_u8(self.failsafe);
18909        __tmp.put_u8(self.wp_num);
18910        if matches!(version, MavlinkVersion::V2) {
18911            let len = __tmp.len();
18912            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18913        } else {
18914            __tmp.len()
18915        }
18916    }
18917}
18918#[doc = "id: 103"]
18919#[doc = "Speed estimate from a vision source."]
18920#[derive(Debug, Clone, PartialEq)]
18921#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18922#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18923pub struct VISION_SPEED_ESTIMATE_DATA {
18924    #[doc = "Timestamp (UNIX time or time since system boot)"]
18925    pub usec: u64,
18926    #[doc = "Global X speed"]
18927    pub x: f32,
18928    #[doc = "Global Y speed"]
18929    pub y: f32,
18930    #[doc = "Global Z speed"]
18931    pub z: f32,
18932    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
18933    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18934    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18935    pub covariance: [f32; 9],
18936    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
18937    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18938    pub reset_counter: u8,
18939}
18940impl VISION_SPEED_ESTIMATE_DATA {
18941    pub const ENCODED_LEN: usize = 57usize;
18942    pub const DEFAULT: Self = Self {
18943        usec: 0_u64,
18944        x: 0.0_f32,
18945        y: 0.0_f32,
18946        z: 0.0_f32,
18947        covariance: [0.0_f32; 9usize],
18948        reset_counter: 0_u8,
18949    };
18950    #[cfg(feature = "arbitrary")]
18951    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18952        use arbitrary::{Arbitrary, Unstructured};
18953        let mut buf = [0u8; 1024];
18954        rng.fill_bytes(&mut buf);
18955        let mut unstructured = Unstructured::new(&buf);
18956        Self::arbitrary(&mut unstructured).unwrap_or_default()
18957    }
18958}
18959impl Default for VISION_SPEED_ESTIMATE_DATA {
18960    fn default() -> Self {
18961        Self::DEFAULT.clone()
18962    }
18963}
18964impl MessageData for VISION_SPEED_ESTIMATE_DATA {
18965    type Message = MavMessage;
18966    const ID: u32 = 103u32;
18967    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
18968    const EXTRA_CRC: u8 = 208u8;
18969    const ENCODED_LEN: usize = 57usize;
18970    fn deser(
18971        _version: MavlinkVersion,
18972        __input: &[u8],
18973    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18974        let avail_len = __input.len();
18975        let mut payload_buf = [0; Self::ENCODED_LEN];
18976        let mut buf = if avail_len < Self::ENCODED_LEN {
18977            payload_buf[0..avail_len].copy_from_slice(__input);
18978            Bytes::new(&payload_buf)
18979        } else {
18980            Bytes::new(__input)
18981        };
18982        let mut __struct = Self::default();
18983        __struct.usec = buf.get_u64_le();
18984        __struct.x = buf.get_f32_le();
18985        __struct.y = buf.get_f32_le();
18986        __struct.z = buf.get_f32_le();
18987        for v in &mut __struct.covariance {
18988            let val = buf.get_f32_le();
18989            *v = val;
18990        }
18991        __struct.reset_counter = buf.get_u8();
18992        Ok(__struct)
18993    }
18994    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18995        let mut __tmp = BytesMut::new(bytes);
18996        #[allow(clippy::absurd_extreme_comparisons)]
18997        #[allow(unused_comparisons)]
18998        if __tmp.remaining() < Self::ENCODED_LEN {
18999            panic!(
19000                "buffer is too small (need {} bytes, but got {})",
19001                Self::ENCODED_LEN,
19002                __tmp.remaining(),
19003            )
19004        }
19005        __tmp.put_u64_le(self.usec);
19006        __tmp.put_f32_le(self.x);
19007        __tmp.put_f32_le(self.y);
19008        __tmp.put_f32_le(self.z);
19009        for val in &self.covariance {
19010            __tmp.put_f32_le(*val);
19011        }
19012        __tmp.put_u8(self.reset_counter);
19013        if matches!(version, MavlinkVersion::V2) {
19014            let len = __tmp.len();
19015            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19016        } else {
19017            __tmp.len()
19018        }
19019    }
19020}
19021#[doc = "id: 268"]
19022#[doc = "An ack for a LOGGING_DATA_ACKED message."]
19023#[derive(Debug, Clone, PartialEq)]
19024#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19025#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19026pub struct LOGGING_ACK_DATA {
19027    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
19028    pub sequence: u16,
19029    #[doc = "system ID of the target"]
19030    pub target_system: u8,
19031    #[doc = "component ID of the target"]
19032    pub target_component: u8,
19033}
19034impl LOGGING_ACK_DATA {
19035    pub const ENCODED_LEN: usize = 4usize;
19036    pub const DEFAULT: Self = Self {
19037        sequence: 0_u16,
19038        target_system: 0_u8,
19039        target_component: 0_u8,
19040    };
19041    #[cfg(feature = "arbitrary")]
19042    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19043        use arbitrary::{Arbitrary, Unstructured};
19044        let mut buf = [0u8; 1024];
19045        rng.fill_bytes(&mut buf);
19046        let mut unstructured = Unstructured::new(&buf);
19047        Self::arbitrary(&mut unstructured).unwrap_or_default()
19048    }
19049}
19050impl Default for LOGGING_ACK_DATA {
19051    fn default() -> Self {
19052        Self::DEFAULT.clone()
19053    }
19054}
19055impl MessageData for LOGGING_ACK_DATA {
19056    type Message = MavMessage;
19057    const ID: u32 = 268u32;
19058    const NAME: &'static str = "LOGGING_ACK";
19059    const EXTRA_CRC: u8 = 14u8;
19060    const ENCODED_LEN: usize = 4usize;
19061    fn deser(
19062        _version: MavlinkVersion,
19063        __input: &[u8],
19064    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19065        let avail_len = __input.len();
19066        let mut payload_buf = [0; Self::ENCODED_LEN];
19067        let mut buf = if avail_len < Self::ENCODED_LEN {
19068            payload_buf[0..avail_len].copy_from_slice(__input);
19069            Bytes::new(&payload_buf)
19070        } else {
19071            Bytes::new(__input)
19072        };
19073        let mut __struct = Self::default();
19074        __struct.sequence = buf.get_u16_le();
19075        __struct.target_system = buf.get_u8();
19076        __struct.target_component = buf.get_u8();
19077        Ok(__struct)
19078    }
19079    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19080        let mut __tmp = BytesMut::new(bytes);
19081        #[allow(clippy::absurd_extreme_comparisons)]
19082        #[allow(unused_comparisons)]
19083        if __tmp.remaining() < Self::ENCODED_LEN {
19084            panic!(
19085                "buffer is too small (need {} bytes, but got {})",
19086                Self::ENCODED_LEN,
19087                __tmp.remaining(),
19088            )
19089        }
19090        __tmp.put_u16_le(self.sequence);
19091        __tmp.put_u8(self.target_system);
19092        __tmp.put_u8(self.target_component);
19093        if matches!(version, MavlinkVersion::V2) {
19094            let len = __tmp.len();
19095            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19096        } else {
19097            __tmp.len()
19098        }
19099    }
19100}
19101#[doc = "id: 284"]
19102#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
19103#[derive(Debug, Clone, PartialEq)]
19104#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19105#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19106pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
19107    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
19108    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19109    pub q: [f32; 4],
19110    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
19111    pub angular_velocity_x: f32,
19112    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
19113    pub angular_velocity_y: f32,
19114    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
19115    pub angular_velocity_z: f32,
19116    #[doc = "Low level gimbal flags."]
19117    pub flags: GimbalDeviceFlags,
19118    #[doc = "System ID"]
19119    pub target_system: u8,
19120    #[doc = "Component ID"]
19121    pub target_component: u8,
19122}
19123impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
19124    pub const ENCODED_LEN: usize = 32usize;
19125    pub const DEFAULT: Self = Self {
19126        q: [0.0_f32; 4usize],
19127        angular_velocity_x: 0.0_f32,
19128        angular_velocity_y: 0.0_f32,
19129        angular_velocity_z: 0.0_f32,
19130        flags: GimbalDeviceFlags::DEFAULT,
19131        target_system: 0_u8,
19132        target_component: 0_u8,
19133    };
19134    #[cfg(feature = "arbitrary")]
19135    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19136        use arbitrary::{Arbitrary, Unstructured};
19137        let mut buf = [0u8; 1024];
19138        rng.fill_bytes(&mut buf);
19139        let mut unstructured = Unstructured::new(&buf);
19140        Self::arbitrary(&mut unstructured).unwrap_or_default()
19141    }
19142}
19143impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
19144    fn default() -> Self {
19145        Self::DEFAULT.clone()
19146    }
19147}
19148impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
19149    type Message = MavMessage;
19150    const ID: u32 = 284u32;
19151    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
19152    const EXTRA_CRC: u8 = 99u8;
19153    const ENCODED_LEN: usize = 32usize;
19154    fn deser(
19155        _version: MavlinkVersion,
19156        __input: &[u8],
19157    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19158        let avail_len = __input.len();
19159        let mut payload_buf = [0; Self::ENCODED_LEN];
19160        let mut buf = if avail_len < Self::ENCODED_LEN {
19161            payload_buf[0..avail_len].copy_from_slice(__input);
19162            Bytes::new(&payload_buf)
19163        } else {
19164            Bytes::new(__input)
19165        };
19166        let mut __struct = Self::default();
19167        for v in &mut __struct.q {
19168            let val = buf.get_f32_le();
19169            *v = val;
19170        }
19171        __struct.angular_velocity_x = buf.get_f32_le();
19172        __struct.angular_velocity_y = buf.get_f32_le();
19173        __struct.angular_velocity_z = buf.get_f32_le();
19174        let tmp = buf.get_u16_le();
19175        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
19176            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
19177                flag_type: "GimbalDeviceFlags",
19178                value: tmp as u32,
19179            })?;
19180        __struct.target_system = buf.get_u8();
19181        __struct.target_component = buf.get_u8();
19182        Ok(__struct)
19183    }
19184    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19185        let mut __tmp = BytesMut::new(bytes);
19186        #[allow(clippy::absurd_extreme_comparisons)]
19187        #[allow(unused_comparisons)]
19188        if __tmp.remaining() < Self::ENCODED_LEN {
19189            panic!(
19190                "buffer is too small (need {} bytes, but got {})",
19191                Self::ENCODED_LEN,
19192                __tmp.remaining(),
19193            )
19194        }
19195        for val in &self.q {
19196            __tmp.put_f32_le(*val);
19197        }
19198        __tmp.put_f32_le(self.angular_velocity_x);
19199        __tmp.put_f32_le(self.angular_velocity_y);
19200        __tmp.put_f32_le(self.angular_velocity_z);
19201        __tmp.put_u16_le(self.flags.bits());
19202        __tmp.put_u8(self.target_system);
19203        __tmp.put_u8(self.target_component);
19204        if matches!(version, MavlinkVersion::V2) {
19205            let len = __tmp.len();
19206            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19207        } else {
19208            __tmp.len()
19209        }
19210    }
19211}
19212#[doc = "id: 11"]
19213#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
19214#[derive(Debug, Clone, PartialEq)]
19215#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19216#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19217pub struct SET_MODE_DATA {
19218    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
19219    pub custom_mode: u32,
19220    #[doc = "The system setting the mode"]
19221    pub target_system: u8,
19222    #[doc = "The new base mode."]
19223    pub base_mode: MavMode,
19224}
19225impl SET_MODE_DATA {
19226    pub const ENCODED_LEN: usize = 6usize;
19227    pub const DEFAULT: Self = Self {
19228        custom_mode: 0_u32,
19229        target_system: 0_u8,
19230        base_mode: MavMode::DEFAULT,
19231    };
19232    #[cfg(feature = "arbitrary")]
19233    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19234        use arbitrary::{Arbitrary, Unstructured};
19235        let mut buf = [0u8; 1024];
19236        rng.fill_bytes(&mut buf);
19237        let mut unstructured = Unstructured::new(&buf);
19238        Self::arbitrary(&mut unstructured).unwrap_or_default()
19239    }
19240}
19241impl Default for SET_MODE_DATA {
19242    fn default() -> Self {
19243        Self::DEFAULT.clone()
19244    }
19245}
19246impl MessageData for SET_MODE_DATA {
19247    type Message = MavMessage;
19248    const ID: u32 = 11u32;
19249    const NAME: &'static str = "SET_MODE";
19250    const EXTRA_CRC: u8 = 89u8;
19251    const ENCODED_LEN: usize = 6usize;
19252    fn deser(
19253        _version: MavlinkVersion,
19254        __input: &[u8],
19255    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19256        let avail_len = __input.len();
19257        let mut payload_buf = [0; Self::ENCODED_LEN];
19258        let mut buf = if avail_len < Self::ENCODED_LEN {
19259            payload_buf[0..avail_len].copy_from_slice(__input);
19260            Bytes::new(&payload_buf)
19261        } else {
19262            Bytes::new(__input)
19263        };
19264        let mut __struct = Self::default();
19265        __struct.custom_mode = buf.get_u32_le();
19266        __struct.target_system = buf.get_u8();
19267        let tmp = buf.get_u8();
19268        __struct.base_mode =
19269            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19270                enum_type: "MavMode",
19271                value: tmp as u32,
19272            })?;
19273        Ok(__struct)
19274    }
19275    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19276        let mut __tmp = BytesMut::new(bytes);
19277        #[allow(clippy::absurd_extreme_comparisons)]
19278        #[allow(unused_comparisons)]
19279        if __tmp.remaining() < Self::ENCODED_LEN {
19280            panic!(
19281                "buffer is too small (need {} bytes, but got {})",
19282                Self::ENCODED_LEN,
19283                __tmp.remaining(),
19284            )
19285        }
19286        __tmp.put_u32_le(self.custom_mode);
19287        __tmp.put_u8(self.target_system);
19288        __tmp.put_u8(self.base_mode as u8);
19289        if matches!(version, MavlinkVersion::V2) {
19290            let len = __tmp.len();
19291            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19292        } else {
19293            __tmp.len()
19294        }
19295    }
19296}
19297#[doc = "id: 65"]
19298#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
19299#[derive(Debug, Clone, PartialEq)]
19300#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19301#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19302pub struct RC_CHANNELS_DATA {
19303    #[doc = "Timestamp (time since system boot)."]
19304    pub time_boot_ms: u32,
19305    #[doc = "RC channel 1 value."]
19306    pub chan1_raw: u16,
19307    #[doc = "RC channel 2 value."]
19308    pub chan2_raw: u16,
19309    #[doc = "RC channel 3 value."]
19310    pub chan3_raw: u16,
19311    #[doc = "RC channel 4 value."]
19312    pub chan4_raw: u16,
19313    #[doc = "RC channel 5 value."]
19314    pub chan5_raw: u16,
19315    #[doc = "RC channel 6 value."]
19316    pub chan6_raw: u16,
19317    #[doc = "RC channel 7 value."]
19318    pub chan7_raw: u16,
19319    #[doc = "RC channel 8 value."]
19320    pub chan8_raw: u16,
19321    #[doc = "RC channel 9 value."]
19322    pub chan9_raw: u16,
19323    #[doc = "RC channel 10 value."]
19324    pub chan10_raw: u16,
19325    #[doc = "RC channel 11 value."]
19326    pub chan11_raw: u16,
19327    #[doc = "RC channel 12 value."]
19328    pub chan12_raw: u16,
19329    #[doc = "RC channel 13 value."]
19330    pub chan13_raw: u16,
19331    #[doc = "RC channel 14 value."]
19332    pub chan14_raw: u16,
19333    #[doc = "RC channel 15 value."]
19334    pub chan15_raw: u16,
19335    #[doc = "RC channel 16 value."]
19336    pub chan16_raw: u16,
19337    #[doc = "RC channel 17 value."]
19338    pub chan17_raw: u16,
19339    #[doc = "RC channel 18 value."]
19340    pub chan18_raw: u16,
19341    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
19342    pub chancount: u8,
19343    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
19344    pub rssi: u8,
19345}
19346impl RC_CHANNELS_DATA {
19347    pub const ENCODED_LEN: usize = 42usize;
19348    pub const DEFAULT: Self = Self {
19349        time_boot_ms: 0_u32,
19350        chan1_raw: 0_u16,
19351        chan2_raw: 0_u16,
19352        chan3_raw: 0_u16,
19353        chan4_raw: 0_u16,
19354        chan5_raw: 0_u16,
19355        chan6_raw: 0_u16,
19356        chan7_raw: 0_u16,
19357        chan8_raw: 0_u16,
19358        chan9_raw: 0_u16,
19359        chan10_raw: 0_u16,
19360        chan11_raw: 0_u16,
19361        chan12_raw: 0_u16,
19362        chan13_raw: 0_u16,
19363        chan14_raw: 0_u16,
19364        chan15_raw: 0_u16,
19365        chan16_raw: 0_u16,
19366        chan17_raw: 0_u16,
19367        chan18_raw: 0_u16,
19368        chancount: 0_u8,
19369        rssi: 0_u8,
19370    };
19371    #[cfg(feature = "arbitrary")]
19372    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19373        use arbitrary::{Arbitrary, Unstructured};
19374        let mut buf = [0u8; 1024];
19375        rng.fill_bytes(&mut buf);
19376        let mut unstructured = Unstructured::new(&buf);
19377        Self::arbitrary(&mut unstructured).unwrap_or_default()
19378    }
19379}
19380impl Default for RC_CHANNELS_DATA {
19381    fn default() -> Self {
19382        Self::DEFAULT.clone()
19383    }
19384}
19385impl MessageData for RC_CHANNELS_DATA {
19386    type Message = MavMessage;
19387    const ID: u32 = 65u32;
19388    const NAME: &'static str = "RC_CHANNELS";
19389    const EXTRA_CRC: u8 = 118u8;
19390    const ENCODED_LEN: usize = 42usize;
19391    fn deser(
19392        _version: MavlinkVersion,
19393        __input: &[u8],
19394    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19395        let avail_len = __input.len();
19396        let mut payload_buf = [0; Self::ENCODED_LEN];
19397        let mut buf = if avail_len < Self::ENCODED_LEN {
19398            payload_buf[0..avail_len].copy_from_slice(__input);
19399            Bytes::new(&payload_buf)
19400        } else {
19401            Bytes::new(__input)
19402        };
19403        let mut __struct = Self::default();
19404        __struct.time_boot_ms = buf.get_u32_le();
19405        __struct.chan1_raw = buf.get_u16_le();
19406        __struct.chan2_raw = buf.get_u16_le();
19407        __struct.chan3_raw = buf.get_u16_le();
19408        __struct.chan4_raw = buf.get_u16_le();
19409        __struct.chan5_raw = buf.get_u16_le();
19410        __struct.chan6_raw = buf.get_u16_le();
19411        __struct.chan7_raw = buf.get_u16_le();
19412        __struct.chan8_raw = buf.get_u16_le();
19413        __struct.chan9_raw = buf.get_u16_le();
19414        __struct.chan10_raw = buf.get_u16_le();
19415        __struct.chan11_raw = buf.get_u16_le();
19416        __struct.chan12_raw = buf.get_u16_le();
19417        __struct.chan13_raw = buf.get_u16_le();
19418        __struct.chan14_raw = buf.get_u16_le();
19419        __struct.chan15_raw = buf.get_u16_le();
19420        __struct.chan16_raw = buf.get_u16_le();
19421        __struct.chan17_raw = buf.get_u16_le();
19422        __struct.chan18_raw = buf.get_u16_le();
19423        __struct.chancount = buf.get_u8();
19424        __struct.rssi = buf.get_u8();
19425        Ok(__struct)
19426    }
19427    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19428        let mut __tmp = BytesMut::new(bytes);
19429        #[allow(clippy::absurd_extreme_comparisons)]
19430        #[allow(unused_comparisons)]
19431        if __tmp.remaining() < Self::ENCODED_LEN {
19432            panic!(
19433                "buffer is too small (need {} bytes, but got {})",
19434                Self::ENCODED_LEN,
19435                __tmp.remaining(),
19436            )
19437        }
19438        __tmp.put_u32_le(self.time_boot_ms);
19439        __tmp.put_u16_le(self.chan1_raw);
19440        __tmp.put_u16_le(self.chan2_raw);
19441        __tmp.put_u16_le(self.chan3_raw);
19442        __tmp.put_u16_le(self.chan4_raw);
19443        __tmp.put_u16_le(self.chan5_raw);
19444        __tmp.put_u16_le(self.chan6_raw);
19445        __tmp.put_u16_le(self.chan7_raw);
19446        __tmp.put_u16_le(self.chan8_raw);
19447        __tmp.put_u16_le(self.chan9_raw);
19448        __tmp.put_u16_le(self.chan10_raw);
19449        __tmp.put_u16_le(self.chan11_raw);
19450        __tmp.put_u16_le(self.chan12_raw);
19451        __tmp.put_u16_le(self.chan13_raw);
19452        __tmp.put_u16_le(self.chan14_raw);
19453        __tmp.put_u16_le(self.chan15_raw);
19454        __tmp.put_u16_le(self.chan16_raw);
19455        __tmp.put_u16_le(self.chan17_raw);
19456        __tmp.put_u16_le(self.chan18_raw);
19457        __tmp.put_u8(self.chancount);
19458        __tmp.put_u8(self.rssi);
19459        if matches!(version, MavlinkVersion::V2) {
19460            let len = __tmp.len();
19461            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19462        } else {
19463            __tmp.len()
19464        }
19465    }
19466}
19467#[doc = "id: 290"]
19468#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
19469#[derive(Debug, Clone, PartialEq)]
19470#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19471#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19472pub struct ESC_INFO_DATA {
19473    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
19474    pub time_usec: u64,
19475    #[doc = "Number of reported errors by each ESC since boot."]
19476    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19477    pub error_count: [u32; 4],
19478    #[doc = "Counter of data packets received."]
19479    pub counter: u16,
19480    #[doc = "Bitmap of ESC failure flags."]
19481    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19482    pub failure_flags: [u16; 4],
19483    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
19484    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19485    pub temperature: [i16; 4],
19486    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
19487    pub index: u8,
19488    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
19489    pub count: u8,
19490    #[doc = "Connection type protocol for all ESC."]
19491    pub connection_type: EscConnectionType,
19492    #[doc = "Information regarding online/offline status of each ESC."]
19493    pub info: u8,
19494}
19495impl ESC_INFO_DATA {
19496    pub const ENCODED_LEN: usize = 46usize;
19497    pub const DEFAULT: Self = Self {
19498        time_usec: 0_u64,
19499        error_count: [0_u32; 4usize],
19500        counter: 0_u16,
19501        failure_flags: [0_u16; 4usize],
19502        temperature: [0_i16; 4usize],
19503        index: 0_u8,
19504        count: 0_u8,
19505        connection_type: EscConnectionType::DEFAULT,
19506        info: 0_u8,
19507    };
19508    #[cfg(feature = "arbitrary")]
19509    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19510        use arbitrary::{Arbitrary, Unstructured};
19511        let mut buf = [0u8; 1024];
19512        rng.fill_bytes(&mut buf);
19513        let mut unstructured = Unstructured::new(&buf);
19514        Self::arbitrary(&mut unstructured).unwrap_or_default()
19515    }
19516}
19517impl Default for ESC_INFO_DATA {
19518    fn default() -> Self {
19519        Self::DEFAULT.clone()
19520    }
19521}
19522impl MessageData for ESC_INFO_DATA {
19523    type Message = MavMessage;
19524    const ID: u32 = 290u32;
19525    const NAME: &'static str = "ESC_INFO";
19526    const EXTRA_CRC: u8 = 251u8;
19527    const ENCODED_LEN: usize = 46usize;
19528    fn deser(
19529        _version: MavlinkVersion,
19530        __input: &[u8],
19531    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19532        let avail_len = __input.len();
19533        let mut payload_buf = [0; Self::ENCODED_LEN];
19534        let mut buf = if avail_len < Self::ENCODED_LEN {
19535            payload_buf[0..avail_len].copy_from_slice(__input);
19536            Bytes::new(&payload_buf)
19537        } else {
19538            Bytes::new(__input)
19539        };
19540        let mut __struct = Self::default();
19541        __struct.time_usec = buf.get_u64_le();
19542        for v in &mut __struct.error_count {
19543            let val = buf.get_u32_le();
19544            *v = val;
19545        }
19546        __struct.counter = buf.get_u16_le();
19547        for v in &mut __struct.failure_flags {
19548            let val = buf.get_u16_le();
19549            *v = val;
19550        }
19551        for v in &mut __struct.temperature {
19552            let val = buf.get_i16_le();
19553            *v = val;
19554        }
19555        __struct.index = buf.get_u8();
19556        __struct.count = buf.get_u8();
19557        let tmp = buf.get_u8();
19558        __struct.connection_type =
19559            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19560                enum_type: "EscConnectionType",
19561                value: tmp as u32,
19562            })?;
19563        __struct.info = buf.get_u8();
19564        Ok(__struct)
19565    }
19566    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19567        let mut __tmp = BytesMut::new(bytes);
19568        #[allow(clippy::absurd_extreme_comparisons)]
19569        #[allow(unused_comparisons)]
19570        if __tmp.remaining() < Self::ENCODED_LEN {
19571            panic!(
19572                "buffer is too small (need {} bytes, but got {})",
19573                Self::ENCODED_LEN,
19574                __tmp.remaining(),
19575            )
19576        }
19577        __tmp.put_u64_le(self.time_usec);
19578        for val in &self.error_count {
19579            __tmp.put_u32_le(*val);
19580        }
19581        __tmp.put_u16_le(self.counter);
19582        for val in &self.failure_flags {
19583            __tmp.put_u16_le(*val);
19584        }
19585        for val in &self.temperature {
19586            __tmp.put_i16_le(*val);
19587        }
19588        __tmp.put_u8(self.index);
19589        __tmp.put_u8(self.count);
19590        __tmp.put_u8(self.connection_type as u8);
19591        __tmp.put_u8(self.info);
19592        if matches!(version, MavlinkVersion::V2) {
19593            let len = __tmp.len();
19594            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19595        } else {
19596            __tmp.len()
19597        }
19598    }
19599}
19600#[doc = "id: 104"]
19601#[doc = "Global position estimate from a Vicon motion system source."]
19602#[derive(Debug, Clone, PartialEq)]
19603#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19604#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19605pub struct VICON_POSITION_ESTIMATE_DATA {
19606    #[doc = "Timestamp (UNIX time or time since system boot)"]
19607    pub usec: u64,
19608    #[doc = "Global X position"]
19609    pub x: f32,
19610    #[doc = "Global Y position"]
19611    pub y: f32,
19612    #[doc = "Global Z position"]
19613    pub z: f32,
19614    #[doc = "Roll angle"]
19615    pub roll: f32,
19616    #[doc = "Pitch angle"]
19617    pub pitch: f32,
19618    #[doc = "Yaw angle"]
19619    pub yaw: f32,
19620    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
19621    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19622    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19623    pub covariance: [f32; 21],
19624}
19625impl VICON_POSITION_ESTIMATE_DATA {
19626    pub const ENCODED_LEN: usize = 116usize;
19627    pub const DEFAULT: Self = Self {
19628        usec: 0_u64,
19629        x: 0.0_f32,
19630        y: 0.0_f32,
19631        z: 0.0_f32,
19632        roll: 0.0_f32,
19633        pitch: 0.0_f32,
19634        yaw: 0.0_f32,
19635        covariance: [0.0_f32; 21usize],
19636    };
19637    #[cfg(feature = "arbitrary")]
19638    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19639        use arbitrary::{Arbitrary, Unstructured};
19640        let mut buf = [0u8; 1024];
19641        rng.fill_bytes(&mut buf);
19642        let mut unstructured = Unstructured::new(&buf);
19643        Self::arbitrary(&mut unstructured).unwrap_or_default()
19644    }
19645}
19646impl Default for VICON_POSITION_ESTIMATE_DATA {
19647    fn default() -> Self {
19648        Self::DEFAULT.clone()
19649    }
19650}
19651impl MessageData for VICON_POSITION_ESTIMATE_DATA {
19652    type Message = MavMessage;
19653    const ID: u32 = 104u32;
19654    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
19655    const EXTRA_CRC: u8 = 56u8;
19656    const ENCODED_LEN: usize = 116usize;
19657    fn deser(
19658        _version: MavlinkVersion,
19659        __input: &[u8],
19660    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19661        let avail_len = __input.len();
19662        let mut payload_buf = [0; Self::ENCODED_LEN];
19663        let mut buf = if avail_len < Self::ENCODED_LEN {
19664            payload_buf[0..avail_len].copy_from_slice(__input);
19665            Bytes::new(&payload_buf)
19666        } else {
19667            Bytes::new(__input)
19668        };
19669        let mut __struct = Self::default();
19670        __struct.usec = buf.get_u64_le();
19671        __struct.x = buf.get_f32_le();
19672        __struct.y = buf.get_f32_le();
19673        __struct.z = buf.get_f32_le();
19674        __struct.roll = buf.get_f32_le();
19675        __struct.pitch = buf.get_f32_le();
19676        __struct.yaw = buf.get_f32_le();
19677        for v in &mut __struct.covariance {
19678            let val = buf.get_f32_le();
19679            *v = val;
19680        }
19681        Ok(__struct)
19682    }
19683    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19684        let mut __tmp = BytesMut::new(bytes);
19685        #[allow(clippy::absurd_extreme_comparisons)]
19686        #[allow(unused_comparisons)]
19687        if __tmp.remaining() < Self::ENCODED_LEN {
19688            panic!(
19689                "buffer is too small (need {} bytes, but got {})",
19690                Self::ENCODED_LEN,
19691                __tmp.remaining(),
19692            )
19693        }
19694        __tmp.put_u64_le(self.usec);
19695        __tmp.put_f32_le(self.x);
19696        __tmp.put_f32_le(self.y);
19697        __tmp.put_f32_le(self.z);
19698        __tmp.put_f32_le(self.roll);
19699        __tmp.put_f32_le(self.pitch);
19700        __tmp.put_f32_le(self.yaw);
19701        for val in &self.covariance {
19702            __tmp.put_f32_le(*val);
19703        }
19704        if matches!(version, MavlinkVersion::V2) {
19705            let len = __tmp.len();
19706            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19707        } else {
19708            __tmp.len()
19709        }
19710    }
19711}
19712#[doc = "id: 12904"]
19713#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
19714#[derive(Debug, Clone, PartialEq)]
19715#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19716#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19717pub struct OPEN_DRONE_ID_SYSTEM_DATA {
19718    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
19719    pub operator_latitude: i32,
19720    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
19721    pub operator_longitude: i32,
19722    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
19723    pub area_ceiling: f32,
19724    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
19725    pub area_floor: f32,
19726    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
19727    pub operator_altitude_geo: f32,
19728    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
19729    pub timestamp: u32,
19730    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
19731    pub area_count: u16,
19732    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
19733    pub area_radius: u16,
19734    #[doc = "System ID (0 for broadcast)."]
19735    pub target_system: u8,
19736    #[doc = "Component ID (0 for broadcast)."]
19737    pub target_component: u8,
19738    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
19739    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19740    pub id_or_mac: [u8; 20],
19741    #[doc = "Specifies the operator location type."]
19742    pub operator_location_type: MavOdidOperatorLocationType,
19743    #[doc = "Specifies the classification type of the UA."]
19744    pub classification_type: MavOdidClassificationType,
19745    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
19746    pub category_eu: MavOdidCategoryEu,
19747    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
19748    pub class_eu: MavOdidClassEu,
19749}
19750impl OPEN_DRONE_ID_SYSTEM_DATA {
19751    pub const ENCODED_LEN: usize = 54usize;
19752    pub const DEFAULT: Self = Self {
19753        operator_latitude: 0_i32,
19754        operator_longitude: 0_i32,
19755        area_ceiling: 0.0_f32,
19756        area_floor: 0.0_f32,
19757        operator_altitude_geo: 0.0_f32,
19758        timestamp: 0_u32,
19759        area_count: 0_u16,
19760        area_radius: 0_u16,
19761        target_system: 0_u8,
19762        target_component: 0_u8,
19763        id_or_mac: [0_u8; 20usize],
19764        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
19765        classification_type: MavOdidClassificationType::DEFAULT,
19766        category_eu: MavOdidCategoryEu::DEFAULT,
19767        class_eu: MavOdidClassEu::DEFAULT,
19768    };
19769    #[cfg(feature = "arbitrary")]
19770    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19771        use arbitrary::{Arbitrary, Unstructured};
19772        let mut buf = [0u8; 1024];
19773        rng.fill_bytes(&mut buf);
19774        let mut unstructured = Unstructured::new(&buf);
19775        Self::arbitrary(&mut unstructured).unwrap_or_default()
19776    }
19777}
19778impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
19779    fn default() -> Self {
19780        Self::DEFAULT.clone()
19781    }
19782}
19783impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
19784    type Message = MavMessage;
19785    const ID: u32 = 12904u32;
19786    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
19787    const EXTRA_CRC: u8 = 77u8;
19788    const ENCODED_LEN: usize = 54usize;
19789    fn deser(
19790        _version: MavlinkVersion,
19791        __input: &[u8],
19792    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19793        let avail_len = __input.len();
19794        let mut payload_buf = [0; Self::ENCODED_LEN];
19795        let mut buf = if avail_len < Self::ENCODED_LEN {
19796            payload_buf[0..avail_len].copy_from_slice(__input);
19797            Bytes::new(&payload_buf)
19798        } else {
19799            Bytes::new(__input)
19800        };
19801        let mut __struct = Self::default();
19802        __struct.operator_latitude = buf.get_i32_le();
19803        __struct.operator_longitude = buf.get_i32_le();
19804        __struct.area_ceiling = buf.get_f32_le();
19805        __struct.area_floor = buf.get_f32_le();
19806        __struct.operator_altitude_geo = buf.get_f32_le();
19807        __struct.timestamp = buf.get_u32_le();
19808        __struct.area_count = buf.get_u16_le();
19809        __struct.area_radius = buf.get_u16_le();
19810        __struct.target_system = buf.get_u8();
19811        __struct.target_component = buf.get_u8();
19812        for v in &mut __struct.id_or_mac {
19813            let val = buf.get_u8();
19814            *v = val;
19815        }
19816        let tmp = buf.get_u8();
19817        __struct.operator_location_type =
19818            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19819                enum_type: "MavOdidOperatorLocationType",
19820                value: tmp as u32,
19821            })?;
19822        let tmp = buf.get_u8();
19823        __struct.classification_type =
19824            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19825                enum_type: "MavOdidClassificationType",
19826                value: tmp as u32,
19827            })?;
19828        let tmp = buf.get_u8();
19829        __struct.category_eu =
19830            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19831                enum_type: "MavOdidCategoryEu",
19832                value: tmp as u32,
19833            })?;
19834        let tmp = buf.get_u8();
19835        __struct.class_eu =
19836            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19837                enum_type: "MavOdidClassEu",
19838                value: tmp as u32,
19839            })?;
19840        Ok(__struct)
19841    }
19842    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19843        let mut __tmp = BytesMut::new(bytes);
19844        #[allow(clippy::absurd_extreme_comparisons)]
19845        #[allow(unused_comparisons)]
19846        if __tmp.remaining() < Self::ENCODED_LEN {
19847            panic!(
19848                "buffer is too small (need {} bytes, but got {})",
19849                Self::ENCODED_LEN,
19850                __tmp.remaining(),
19851            )
19852        }
19853        __tmp.put_i32_le(self.operator_latitude);
19854        __tmp.put_i32_le(self.operator_longitude);
19855        __tmp.put_f32_le(self.area_ceiling);
19856        __tmp.put_f32_le(self.area_floor);
19857        __tmp.put_f32_le(self.operator_altitude_geo);
19858        __tmp.put_u32_le(self.timestamp);
19859        __tmp.put_u16_le(self.area_count);
19860        __tmp.put_u16_le(self.area_radius);
19861        __tmp.put_u8(self.target_system);
19862        __tmp.put_u8(self.target_component);
19863        for val in &self.id_or_mac {
19864            __tmp.put_u8(*val);
19865        }
19866        __tmp.put_u8(self.operator_location_type as u8);
19867        __tmp.put_u8(self.classification_type as u8);
19868        __tmp.put_u8(self.category_eu as u8);
19869        __tmp.put_u8(self.class_eu as u8);
19870        if matches!(version, MavlinkVersion::V2) {
19871            let len = __tmp.len();
19872            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19873        } else {
19874            __tmp.len()
19875        }
19876    }
19877}
19878#[doc = "id: 266"]
19879#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
19880#[derive(Debug, Clone, PartialEq)]
19881#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19882#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19883pub struct LOGGING_DATA_DATA {
19884    #[doc = "sequence number (can wrap)"]
19885    pub sequence: u16,
19886    #[doc = "system ID of the target"]
19887    pub target_system: u8,
19888    #[doc = "component ID of the target"]
19889    pub target_component: u8,
19890    #[doc = "data length"]
19891    pub length: u8,
19892    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
19893    pub first_message_offset: u8,
19894    #[doc = "logged data"]
19895    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19896    pub data: [u8; 249],
19897}
19898impl LOGGING_DATA_DATA {
19899    pub const ENCODED_LEN: usize = 255usize;
19900    pub const DEFAULT: Self = Self {
19901        sequence: 0_u16,
19902        target_system: 0_u8,
19903        target_component: 0_u8,
19904        length: 0_u8,
19905        first_message_offset: 0_u8,
19906        data: [0_u8; 249usize],
19907    };
19908    #[cfg(feature = "arbitrary")]
19909    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19910        use arbitrary::{Arbitrary, Unstructured};
19911        let mut buf = [0u8; 1024];
19912        rng.fill_bytes(&mut buf);
19913        let mut unstructured = Unstructured::new(&buf);
19914        Self::arbitrary(&mut unstructured).unwrap_or_default()
19915    }
19916}
19917impl Default for LOGGING_DATA_DATA {
19918    fn default() -> Self {
19919        Self::DEFAULT.clone()
19920    }
19921}
19922impl MessageData for LOGGING_DATA_DATA {
19923    type Message = MavMessage;
19924    const ID: u32 = 266u32;
19925    const NAME: &'static str = "LOGGING_DATA";
19926    const EXTRA_CRC: u8 = 193u8;
19927    const ENCODED_LEN: usize = 255usize;
19928    fn deser(
19929        _version: MavlinkVersion,
19930        __input: &[u8],
19931    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19932        let avail_len = __input.len();
19933        let mut payload_buf = [0; Self::ENCODED_LEN];
19934        let mut buf = if avail_len < Self::ENCODED_LEN {
19935            payload_buf[0..avail_len].copy_from_slice(__input);
19936            Bytes::new(&payload_buf)
19937        } else {
19938            Bytes::new(__input)
19939        };
19940        let mut __struct = Self::default();
19941        __struct.sequence = buf.get_u16_le();
19942        __struct.target_system = buf.get_u8();
19943        __struct.target_component = buf.get_u8();
19944        __struct.length = buf.get_u8();
19945        __struct.first_message_offset = buf.get_u8();
19946        for v in &mut __struct.data {
19947            let val = buf.get_u8();
19948            *v = val;
19949        }
19950        Ok(__struct)
19951    }
19952    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19953        let mut __tmp = BytesMut::new(bytes);
19954        #[allow(clippy::absurd_extreme_comparisons)]
19955        #[allow(unused_comparisons)]
19956        if __tmp.remaining() < Self::ENCODED_LEN {
19957            panic!(
19958                "buffer is too small (need {} bytes, but got {})",
19959                Self::ENCODED_LEN,
19960                __tmp.remaining(),
19961            )
19962        }
19963        __tmp.put_u16_le(self.sequence);
19964        __tmp.put_u8(self.target_system);
19965        __tmp.put_u8(self.target_component);
19966        __tmp.put_u8(self.length);
19967        __tmp.put_u8(self.first_message_offset);
19968        for val in &self.data {
19969            __tmp.put_u8(*val);
19970        }
19971        if matches!(version, MavlinkVersion::V2) {
19972            let len = __tmp.len();
19973            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19974        } else {
19975            __tmp.len()
19976        }
19977    }
19978}
19979#[doc = "id: 119"]
19980#[doc = "Request a chunk of a log."]
19981#[derive(Debug, Clone, PartialEq)]
19982#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19983#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19984pub struct LOG_REQUEST_DATA_DATA {
19985    #[doc = "Offset into the log"]
19986    pub ofs: u32,
19987    #[doc = "Number of bytes"]
19988    pub count: u32,
19989    #[doc = "Log id (from LOG_ENTRY reply)"]
19990    pub id: u16,
19991    #[doc = "System ID"]
19992    pub target_system: u8,
19993    #[doc = "Component ID"]
19994    pub target_component: u8,
19995}
19996impl LOG_REQUEST_DATA_DATA {
19997    pub const ENCODED_LEN: usize = 12usize;
19998    pub const DEFAULT: Self = Self {
19999        ofs: 0_u32,
20000        count: 0_u32,
20001        id: 0_u16,
20002        target_system: 0_u8,
20003        target_component: 0_u8,
20004    };
20005    #[cfg(feature = "arbitrary")]
20006    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20007        use arbitrary::{Arbitrary, Unstructured};
20008        let mut buf = [0u8; 1024];
20009        rng.fill_bytes(&mut buf);
20010        let mut unstructured = Unstructured::new(&buf);
20011        Self::arbitrary(&mut unstructured).unwrap_or_default()
20012    }
20013}
20014impl Default for LOG_REQUEST_DATA_DATA {
20015    fn default() -> Self {
20016        Self::DEFAULT.clone()
20017    }
20018}
20019impl MessageData for LOG_REQUEST_DATA_DATA {
20020    type Message = MavMessage;
20021    const ID: u32 = 119u32;
20022    const NAME: &'static str = "LOG_REQUEST_DATA";
20023    const EXTRA_CRC: u8 = 116u8;
20024    const ENCODED_LEN: usize = 12usize;
20025    fn deser(
20026        _version: MavlinkVersion,
20027        __input: &[u8],
20028    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20029        let avail_len = __input.len();
20030        let mut payload_buf = [0; Self::ENCODED_LEN];
20031        let mut buf = if avail_len < Self::ENCODED_LEN {
20032            payload_buf[0..avail_len].copy_from_slice(__input);
20033            Bytes::new(&payload_buf)
20034        } else {
20035            Bytes::new(__input)
20036        };
20037        let mut __struct = Self::default();
20038        __struct.ofs = buf.get_u32_le();
20039        __struct.count = buf.get_u32_le();
20040        __struct.id = buf.get_u16_le();
20041        __struct.target_system = buf.get_u8();
20042        __struct.target_component = buf.get_u8();
20043        Ok(__struct)
20044    }
20045    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20046        let mut __tmp = BytesMut::new(bytes);
20047        #[allow(clippy::absurd_extreme_comparisons)]
20048        #[allow(unused_comparisons)]
20049        if __tmp.remaining() < Self::ENCODED_LEN {
20050            panic!(
20051                "buffer is too small (need {} bytes, but got {})",
20052                Self::ENCODED_LEN,
20053                __tmp.remaining(),
20054            )
20055        }
20056        __tmp.put_u32_le(self.ofs);
20057        __tmp.put_u32_le(self.count);
20058        __tmp.put_u16_le(self.id);
20059        __tmp.put_u8(self.target_system);
20060        __tmp.put_u8(self.target_component);
20061        if matches!(version, MavlinkVersion::V2) {
20062            let len = __tmp.len();
20063            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20064        } else {
20065            __tmp.len()
20066        }
20067    }
20068}
20069#[doc = "id: 126"]
20070#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
20071#[derive(Debug, Clone, PartialEq)]
20072#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20073#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20074pub struct SERIAL_CONTROL_DATA {
20075    #[doc = "Baudrate of transfer. Zero means no change."]
20076    pub baudrate: u32,
20077    #[doc = "Timeout for reply data"]
20078    pub timeout: u16,
20079    #[doc = "Serial control device type."]
20080    pub device: SerialControlDev,
20081    #[doc = "Bitmap of serial control flags."]
20082    pub flags: SerialControlFlag,
20083    #[doc = "how many bytes in this transfer"]
20084    pub count: u8,
20085    #[doc = "serial data"]
20086    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20087    pub data: [u8; 70],
20088    #[doc = "System ID"]
20089    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20090    pub target_system: u8,
20091    #[doc = "Component ID"]
20092    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20093    pub target_component: u8,
20094}
20095impl SERIAL_CONTROL_DATA {
20096    pub const ENCODED_LEN: usize = 81usize;
20097    pub const DEFAULT: Self = Self {
20098        baudrate: 0_u32,
20099        timeout: 0_u16,
20100        device: SerialControlDev::DEFAULT,
20101        flags: SerialControlFlag::DEFAULT,
20102        count: 0_u8,
20103        data: [0_u8; 70usize],
20104        target_system: 0_u8,
20105        target_component: 0_u8,
20106    };
20107    #[cfg(feature = "arbitrary")]
20108    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20109        use arbitrary::{Arbitrary, Unstructured};
20110        let mut buf = [0u8; 1024];
20111        rng.fill_bytes(&mut buf);
20112        let mut unstructured = Unstructured::new(&buf);
20113        Self::arbitrary(&mut unstructured).unwrap_or_default()
20114    }
20115}
20116impl Default for SERIAL_CONTROL_DATA {
20117    fn default() -> Self {
20118        Self::DEFAULT.clone()
20119    }
20120}
20121impl MessageData for SERIAL_CONTROL_DATA {
20122    type Message = MavMessage;
20123    const ID: u32 = 126u32;
20124    const NAME: &'static str = "SERIAL_CONTROL";
20125    const EXTRA_CRC: u8 = 220u8;
20126    const ENCODED_LEN: usize = 81usize;
20127    fn deser(
20128        _version: MavlinkVersion,
20129        __input: &[u8],
20130    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20131        let avail_len = __input.len();
20132        let mut payload_buf = [0; Self::ENCODED_LEN];
20133        let mut buf = if avail_len < Self::ENCODED_LEN {
20134            payload_buf[0..avail_len].copy_from_slice(__input);
20135            Bytes::new(&payload_buf)
20136        } else {
20137            Bytes::new(__input)
20138        };
20139        let mut __struct = Self::default();
20140        __struct.baudrate = buf.get_u32_le();
20141        __struct.timeout = buf.get_u16_le();
20142        let tmp = buf.get_u8();
20143        __struct.device =
20144            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20145                enum_type: "SerialControlDev",
20146                value: tmp as u32,
20147            })?;
20148        let tmp = buf.get_u8();
20149        __struct.flags = SerialControlFlag::from_bits(tmp & SerialControlFlag::all().bits())
20150            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
20151                flag_type: "SerialControlFlag",
20152                value: tmp as u32,
20153            })?;
20154        __struct.count = buf.get_u8();
20155        for v in &mut __struct.data {
20156            let val = buf.get_u8();
20157            *v = val;
20158        }
20159        __struct.target_system = buf.get_u8();
20160        __struct.target_component = buf.get_u8();
20161        Ok(__struct)
20162    }
20163    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20164        let mut __tmp = BytesMut::new(bytes);
20165        #[allow(clippy::absurd_extreme_comparisons)]
20166        #[allow(unused_comparisons)]
20167        if __tmp.remaining() < Self::ENCODED_LEN {
20168            panic!(
20169                "buffer is too small (need {} bytes, but got {})",
20170                Self::ENCODED_LEN,
20171                __tmp.remaining(),
20172            )
20173        }
20174        __tmp.put_u32_le(self.baudrate);
20175        __tmp.put_u16_le(self.timeout);
20176        __tmp.put_u8(self.device as u8);
20177        __tmp.put_u8(self.flags.bits());
20178        __tmp.put_u8(self.count);
20179        for val in &self.data {
20180            __tmp.put_u8(*val);
20181        }
20182        __tmp.put_u8(self.target_system);
20183        __tmp.put_u8(self.target_component);
20184        if matches!(version, MavlinkVersion::V2) {
20185            let len = __tmp.len();
20186            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20187        } else {
20188            __tmp.len()
20189        }
20190    }
20191}
20192#[doc = "id: 60050"]
20193#[doc = "AVSS PRS system status."]
20194#[derive(Debug, Clone, PartialEq)]
20195#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20196#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20197pub struct AVSS_PRS_SYS_STATUS_DATA {
20198    #[doc = "Timestamp (time since PRS boot)."]
20199    pub time_boot_ms: u32,
20200    #[doc = "PRS error statuses"]
20201    pub error_status: u32,
20202    #[doc = "Estimated battery run-time without a remote connection and PRS battery voltage"]
20203    pub battery_status: u32,
20204    #[doc = "PRS arm statuses"]
20205    pub arm_status: u8,
20206    #[doc = "PRS battery charge statuses"]
20207    pub charge_status: u8,
20208}
20209impl AVSS_PRS_SYS_STATUS_DATA {
20210    pub const ENCODED_LEN: usize = 14usize;
20211    pub const DEFAULT: Self = Self {
20212        time_boot_ms: 0_u32,
20213        error_status: 0_u32,
20214        battery_status: 0_u32,
20215        arm_status: 0_u8,
20216        charge_status: 0_u8,
20217    };
20218    #[cfg(feature = "arbitrary")]
20219    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20220        use arbitrary::{Arbitrary, Unstructured};
20221        let mut buf = [0u8; 1024];
20222        rng.fill_bytes(&mut buf);
20223        let mut unstructured = Unstructured::new(&buf);
20224        Self::arbitrary(&mut unstructured).unwrap_or_default()
20225    }
20226}
20227impl Default for AVSS_PRS_SYS_STATUS_DATA {
20228    fn default() -> Self {
20229        Self::DEFAULT.clone()
20230    }
20231}
20232impl MessageData for AVSS_PRS_SYS_STATUS_DATA {
20233    type Message = MavMessage;
20234    const ID: u32 = 60050u32;
20235    const NAME: &'static str = "AVSS_PRS_SYS_STATUS";
20236    const EXTRA_CRC: u8 = 220u8;
20237    const ENCODED_LEN: usize = 14usize;
20238    fn deser(
20239        _version: MavlinkVersion,
20240        __input: &[u8],
20241    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20242        let avail_len = __input.len();
20243        let mut payload_buf = [0; Self::ENCODED_LEN];
20244        let mut buf = if avail_len < Self::ENCODED_LEN {
20245            payload_buf[0..avail_len].copy_from_slice(__input);
20246            Bytes::new(&payload_buf)
20247        } else {
20248            Bytes::new(__input)
20249        };
20250        let mut __struct = Self::default();
20251        __struct.time_boot_ms = buf.get_u32_le();
20252        __struct.error_status = buf.get_u32_le();
20253        __struct.battery_status = buf.get_u32_le();
20254        __struct.arm_status = buf.get_u8();
20255        __struct.charge_status = buf.get_u8();
20256        Ok(__struct)
20257    }
20258    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20259        let mut __tmp = BytesMut::new(bytes);
20260        #[allow(clippy::absurd_extreme_comparisons)]
20261        #[allow(unused_comparisons)]
20262        if __tmp.remaining() < Self::ENCODED_LEN {
20263            panic!(
20264                "buffer is too small (need {} bytes, but got {})",
20265                Self::ENCODED_LEN,
20266                __tmp.remaining(),
20267            )
20268        }
20269        __tmp.put_u32_le(self.time_boot_ms);
20270        __tmp.put_u32_le(self.error_status);
20271        __tmp.put_u32_le(self.battery_status);
20272        __tmp.put_u8(self.arm_status);
20273        __tmp.put_u8(self.charge_status);
20274        if matches!(version, MavlinkVersion::V2) {
20275            let len = __tmp.len();
20276            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20277        } else {
20278            __tmp.len()
20279        }
20280    }
20281}
20282#[doc = "id: 253"]
20283#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
20284#[derive(Debug, Clone, PartialEq)]
20285#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20286#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20287pub struct STATUSTEXT_DATA {
20288    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
20289    pub severity: MavSeverity,
20290    #[doc = "Status text message, without null termination character"]
20291    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20292    pub text: [u8; 50],
20293    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
20294    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20295    pub id: u16,
20296    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
20297    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20298    pub chunk_seq: u8,
20299}
20300impl STATUSTEXT_DATA {
20301    pub const ENCODED_LEN: usize = 54usize;
20302    pub const DEFAULT: Self = Self {
20303        severity: MavSeverity::DEFAULT,
20304        text: [0_u8; 50usize],
20305        id: 0_u16,
20306        chunk_seq: 0_u8,
20307    };
20308    #[cfg(feature = "arbitrary")]
20309    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20310        use arbitrary::{Arbitrary, Unstructured};
20311        let mut buf = [0u8; 1024];
20312        rng.fill_bytes(&mut buf);
20313        let mut unstructured = Unstructured::new(&buf);
20314        Self::arbitrary(&mut unstructured).unwrap_or_default()
20315    }
20316}
20317impl Default for STATUSTEXT_DATA {
20318    fn default() -> Self {
20319        Self::DEFAULT.clone()
20320    }
20321}
20322impl MessageData for STATUSTEXT_DATA {
20323    type Message = MavMessage;
20324    const ID: u32 = 253u32;
20325    const NAME: &'static str = "STATUSTEXT";
20326    const EXTRA_CRC: u8 = 83u8;
20327    const ENCODED_LEN: usize = 54usize;
20328    fn deser(
20329        _version: MavlinkVersion,
20330        __input: &[u8],
20331    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20332        let avail_len = __input.len();
20333        let mut payload_buf = [0; Self::ENCODED_LEN];
20334        let mut buf = if avail_len < Self::ENCODED_LEN {
20335            payload_buf[0..avail_len].copy_from_slice(__input);
20336            Bytes::new(&payload_buf)
20337        } else {
20338            Bytes::new(__input)
20339        };
20340        let mut __struct = Self::default();
20341        let tmp = buf.get_u8();
20342        __struct.severity =
20343            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20344                enum_type: "MavSeverity",
20345                value: tmp as u32,
20346            })?;
20347        for v in &mut __struct.text {
20348            let val = buf.get_u8();
20349            *v = val;
20350        }
20351        __struct.id = buf.get_u16_le();
20352        __struct.chunk_seq = buf.get_u8();
20353        Ok(__struct)
20354    }
20355    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20356        let mut __tmp = BytesMut::new(bytes);
20357        #[allow(clippy::absurd_extreme_comparisons)]
20358        #[allow(unused_comparisons)]
20359        if __tmp.remaining() < Self::ENCODED_LEN {
20360            panic!(
20361                "buffer is too small (need {} bytes, but got {})",
20362                Self::ENCODED_LEN,
20363                __tmp.remaining(),
20364            )
20365        }
20366        __tmp.put_u8(self.severity as u8);
20367        for val in &self.text {
20368            __tmp.put_u8(*val);
20369        }
20370        __tmp.put_u16_le(self.id);
20371        __tmp.put_u8(self.chunk_seq);
20372        if matches!(version, MavlinkVersion::V2) {
20373            let len = __tmp.len();
20374            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20375        } else {
20376            __tmp.len()
20377        }
20378    }
20379}
20380#[doc = "id: 280"]
20381#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
20382#[derive(Debug, Clone, PartialEq)]
20383#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20384#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20385pub struct GIMBAL_MANAGER_INFORMATION_DATA {
20386    #[doc = "Timestamp (time since system boot)."]
20387    pub time_boot_ms: u32,
20388    #[doc = "Bitmap of gimbal capability flags."]
20389    pub cap_flags: GimbalManagerCapFlags,
20390    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
20391    pub roll_min: f32,
20392    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
20393    pub roll_max: f32,
20394    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
20395    pub pitch_min: f32,
20396    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
20397    pub pitch_max: f32,
20398    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
20399    pub yaw_min: f32,
20400    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
20401    pub yaw_max: f32,
20402    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
20403    pub gimbal_device_id: u8,
20404}
20405impl GIMBAL_MANAGER_INFORMATION_DATA {
20406    pub const ENCODED_LEN: usize = 33usize;
20407    pub const DEFAULT: Self = Self {
20408        time_boot_ms: 0_u32,
20409        cap_flags: GimbalManagerCapFlags::DEFAULT,
20410        roll_min: 0.0_f32,
20411        roll_max: 0.0_f32,
20412        pitch_min: 0.0_f32,
20413        pitch_max: 0.0_f32,
20414        yaw_min: 0.0_f32,
20415        yaw_max: 0.0_f32,
20416        gimbal_device_id: 0_u8,
20417    };
20418    #[cfg(feature = "arbitrary")]
20419    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20420        use arbitrary::{Arbitrary, Unstructured};
20421        let mut buf = [0u8; 1024];
20422        rng.fill_bytes(&mut buf);
20423        let mut unstructured = Unstructured::new(&buf);
20424        Self::arbitrary(&mut unstructured).unwrap_or_default()
20425    }
20426}
20427impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
20428    fn default() -> Self {
20429        Self::DEFAULT.clone()
20430    }
20431}
20432impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
20433    type Message = MavMessage;
20434    const ID: u32 = 280u32;
20435    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
20436    const EXTRA_CRC: u8 = 70u8;
20437    const ENCODED_LEN: usize = 33usize;
20438    fn deser(
20439        _version: MavlinkVersion,
20440        __input: &[u8],
20441    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20442        let avail_len = __input.len();
20443        let mut payload_buf = [0; Self::ENCODED_LEN];
20444        let mut buf = if avail_len < Self::ENCODED_LEN {
20445            payload_buf[0..avail_len].copy_from_slice(__input);
20446            Bytes::new(&payload_buf)
20447        } else {
20448            Bytes::new(__input)
20449        };
20450        let mut __struct = Self::default();
20451        __struct.time_boot_ms = buf.get_u32_le();
20452        let tmp = buf.get_u32_le();
20453        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
20454            tmp & GimbalManagerCapFlags::all().bits(),
20455        )
20456        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
20457            flag_type: "GimbalManagerCapFlags",
20458            value: tmp as u32,
20459        })?;
20460        __struct.roll_min = buf.get_f32_le();
20461        __struct.roll_max = buf.get_f32_le();
20462        __struct.pitch_min = buf.get_f32_le();
20463        __struct.pitch_max = buf.get_f32_le();
20464        __struct.yaw_min = buf.get_f32_le();
20465        __struct.yaw_max = buf.get_f32_le();
20466        __struct.gimbal_device_id = buf.get_u8();
20467        Ok(__struct)
20468    }
20469    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20470        let mut __tmp = BytesMut::new(bytes);
20471        #[allow(clippy::absurd_extreme_comparisons)]
20472        #[allow(unused_comparisons)]
20473        if __tmp.remaining() < Self::ENCODED_LEN {
20474            panic!(
20475                "buffer is too small (need {} bytes, but got {})",
20476                Self::ENCODED_LEN,
20477                __tmp.remaining(),
20478            )
20479        }
20480        __tmp.put_u32_le(self.time_boot_ms);
20481        __tmp.put_u32_le(self.cap_flags.bits());
20482        __tmp.put_f32_le(self.roll_min);
20483        __tmp.put_f32_le(self.roll_max);
20484        __tmp.put_f32_le(self.pitch_min);
20485        __tmp.put_f32_le(self.pitch_max);
20486        __tmp.put_f32_le(self.yaw_min);
20487        __tmp.put_f32_le(self.yaw_max);
20488        __tmp.put_u8(self.gimbal_device_id);
20489        if matches!(version, MavlinkVersion::V2) {
20490            let len = __tmp.len();
20491            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20492        } else {
20493            __tmp.len()
20494        }
20495    }
20496}
20497#[doc = "id: 24"]
20498#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
20499#[derive(Debug, Clone, PartialEq)]
20500#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20501#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20502pub struct GPS_RAW_INT_DATA {
20503    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20504    pub time_usec: u64,
20505    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
20506    pub lat: i32,
20507    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
20508    pub lon: i32,
20509    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
20510    pub alt: i32,
20511    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
20512    pub eph: u16,
20513    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
20514    pub epv: u16,
20515    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
20516    pub vel: u16,
20517    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
20518    pub cog: u16,
20519    #[doc = "GPS fix type."]
20520    pub fix_type: GpsFixType,
20521    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
20522    pub satellites_visible: u8,
20523    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
20524    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20525    pub alt_ellipsoid: i32,
20526    #[doc = "Position uncertainty."]
20527    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20528    pub h_acc: u32,
20529    #[doc = "Altitude uncertainty."]
20530    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20531    pub v_acc: u32,
20532    #[doc = "Speed uncertainty."]
20533    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20534    pub vel_acc: u32,
20535    #[doc = "Heading / track uncertainty"]
20536    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20537    pub hdg_acc: u32,
20538    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
20539    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20540    pub yaw: u16,
20541}
20542impl GPS_RAW_INT_DATA {
20543    pub const ENCODED_LEN: usize = 52usize;
20544    pub const DEFAULT: Self = Self {
20545        time_usec: 0_u64,
20546        lat: 0_i32,
20547        lon: 0_i32,
20548        alt: 0_i32,
20549        eph: 0_u16,
20550        epv: 0_u16,
20551        vel: 0_u16,
20552        cog: 0_u16,
20553        fix_type: GpsFixType::DEFAULT,
20554        satellites_visible: 0_u8,
20555        alt_ellipsoid: 0_i32,
20556        h_acc: 0_u32,
20557        v_acc: 0_u32,
20558        vel_acc: 0_u32,
20559        hdg_acc: 0_u32,
20560        yaw: 0_u16,
20561    };
20562    #[cfg(feature = "arbitrary")]
20563    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20564        use arbitrary::{Arbitrary, Unstructured};
20565        let mut buf = [0u8; 1024];
20566        rng.fill_bytes(&mut buf);
20567        let mut unstructured = Unstructured::new(&buf);
20568        Self::arbitrary(&mut unstructured).unwrap_or_default()
20569    }
20570}
20571impl Default for GPS_RAW_INT_DATA {
20572    fn default() -> Self {
20573        Self::DEFAULT.clone()
20574    }
20575}
20576impl MessageData for GPS_RAW_INT_DATA {
20577    type Message = MavMessage;
20578    const ID: u32 = 24u32;
20579    const NAME: &'static str = "GPS_RAW_INT";
20580    const EXTRA_CRC: u8 = 24u8;
20581    const ENCODED_LEN: usize = 52usize;
20582    fn deser(
20583        _version: MavlinkVersion,
20584        __input: &[u8],
20585    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20586        let avail_len = __input.len();
20587        let mut payload_buf = [0; Self::ENCODED_LEN];
20588        let mut buf = if avail_len < Self::ENCODED_LEN {
20589            payload_buf[0..avail_len].copy_from_slice(__input);
20590            Bytes::new(&payload_buf)
20591        } else {
20592            Bytes::new(__input)
20593        };
20594        let mut __struct = Self::default();
20595        __struct.time_usec = buf.get_u64_le();
20596        __struct.lat = buf.get_i32_le();
20597        __struct.lon = buf.get_i32_le();
20598        __struct.alt = buf.get_i32_le();
20599        __struct.eph = buf.get_u16_le();
20600        __struct.epv = buf.get_u16_le();
20601        __struct.vel = buf.get_u16_le();
20602        __struct.cog = buf.get_u16_le();
20603        let tmp = buf.get_u8();
20604        __struct.fix_type =
20605            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20606                enum_type: "GpsFixType",
20607                value: tmp as u32,
20608            })?;
20609        __struct.satellites_visible = buf.get_u8();
20610        __struct.alt_ellipsoid = buf.get_i32_le();
20611        __struct.h_acc = buf.get_u32_le();
20612        __struct.v_acc = buf.get_u32_le();
20613        __struct.vel_acc = buf.get_u32_le();
20614        __struct.hdg_acc = buf.get_u32_le();
20615        __struct.yaw = buf.get_u16_le();
20616        Ok(__struct)
20617    }
20618    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20619        let mut __tmp = BytesMut::new(bytes);
20620        #[allow(clippy::absurd_extreme_comparisons)]
20621        #[allow(unused_comparisons)]
20622        if __tmp.remaining() < Self::ENCODED_LEN {
20623            panic!(
20624                "buffer is too small (need {} bytes, but got {})",
20625                Self::ENCODED_LEN,
20626                __tmp.remaining(),
20627            )
20628        }
20629        __tmp.put_u64_le(self.time_usec);
20630        __tmp.put_i32_le(self.lat);
20631        __tmp.put_i32_le(self.lon);
20632        __tmp.put_i32_le(self.alt);
20633        __tmp.put_u16_le(self.eph);
20634        __tmp.put_u16_le(self.epv);
20635        __tmp.put_u16_le(self.vel);
20636        __tmp.put_u16_le(self.cog);
20637        __tmp.put_u8(self.fix_type as u8);
20638        __tmp.put_u8(self.satellites_visible);
20639        __tmp.put_i32_le(self.alt_ellipsoid);
20640        __tmp.put_u32_le(self.h_acc);
20641        __tmp.put_u32_le(self.v_acc);
20642        __tmp.put_u32_le(self.vel_acc);
20643        __tmp.put_u32_le(self.hdg_acc);
20644        __tmp.put_u16_le(self.yaw);
20645        if matches!(version, MavlinkVersion::V2) {
20646            let len = __tmp.len();
20647            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20648        } else {
20649            __tmp.len()
20650        }
20651    }
20652}
20653#[doc = "id: 49"]
20654#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
20655#[derive(Debug, Clone, PartialEq)]
20656#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20657#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20658pub struct GPS_GLOBAL_ORIGIN_DATA {
20659    #[doc = "Latitude (WGS84)"]
20660    pub latitude: i32,
20661    #[doc = "Longitude (WGS84)"]
20662    pub longitude: i32,
20663    #[doc = "Altitude (MSL). Positive for up."]
20664    pub altitude: i32,
20665    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20666    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20667    pub time_usec: u64,
20668}
20669impl GPS_GLOBAL_ORIGIN_DATA {
20670    pub const ENCODED_LEN: usize = 20usize;
20671    pub const DEFAULT: Self = Self {
20672        latitude: 0_i32,
20673        longitude: 0_i32,
20674        altitude: 0_i32,
20675        time_usec: 0_u64,
20676    };
20677    #[cfg(feature = "arbitrary")]
20678    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20679        use arbitrary::{Arbitrary, Unstructured};
20680        let mut buf = [0u8; 1024];
20681        rng.fill_bytes(&mut buf);
20682        let mut unstructured = Unstructured::new(&buf);
20683        Self::arbitrary(&mut unstructured).unwrap_or_default()
20684    }
20685}
20686impl Default for GPS_GLOBAL_ORIGIN_DATA {
20687    fn default() -> Self {
20688        Self::DEFAULT.clone()
20689    }
20690}
20691impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
20692    type Message = MavMessage;
20693    const ID: u32 = 49u32;
20694    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
20695    const EXTRA_CRC: u8 = 39u8;
20696    const ENCODED_LEN: usize = 20usize;
20697    fn deser(
20698        _version: MavlinkVersion,
20699        __input: &[u8],
20700    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20701        let avail_len = __input.len();
20702        let mut payload_buf = [0; Self::ENCODED_LEN];
20703        let mut buf = if avail_len < Self::ENCODED_LEN {
20704            payload_buf[0..avail_len].copy_from_slice(__input);
20705            Bytes::new(&payload_buf)
20706        } else {
20707            Bytes::new(__input)
20708        };
20709        let mut __struct = Self::default();
20710        __struct.latitude = buf.get_i32_le();
20711        __struct.longitude = buf.get_i32_le();
20712        __struct.altitude = buf.get_i32_le();
20713        __struct.time_usec = buf.get_u64_le();
20714        Ok(__struct)
20715    }
20716    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20717        let mut __tmp = BytesMut::new(bytes);
20718        #[allow(clippy::absurd_extreme_comparisons)]
20719        #[allow(unused_comparisons)]
20720        if __tmp.remaining() < Self::ENCODED_LEN {
20721            panic!(
20722                "buffer is too small (need {} bytes, but got {})",
20723                Self::ENCODED_LEN,
20724                __tmp.remaining(),
20725            )
20726        }
20727        __tmp.put_i32_le(self.latitude);
20728        __tmp.put_i32_le(self.longitude);
20729        __tmp.put_i32_le(self.altitude);
20730        __tmp.put_u64_le(self.time_usec);
20731        if matches!(version, MavlinkVersion::V2) {
20732            let len = __tmp.len();
20733            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20734        } else {
20735            __tmp.len()
20736        }
20737    }
20738}
20739#[doc = "id: 333"]
20740#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
20741#[derive(Debug, Clone, PartialEq)]
20742#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20743#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20744pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
20745    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20746    pub time_usec: u64,
20747    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
20748    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20749    pub pos_x: [f32; 5],
20750    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
20751    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20752    pub pos_y: [f32; 5],
20753    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
20754    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20755    pub pos_z: [f32; 5],
20756    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
20757    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20758    pub delta: [f32; 5],
20759    #[doc = "Yaw. Set to NaN for unchanged"]
20760    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20761    pub pos_yaw: [f32; 5],
20762    #[doc = "Number of valid control points (up-to 5 points are possible)"]
20763    pub valid_points: u8,
20764}
20765impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
20766    pub const ENCODED_LEN: usize = 109usize;
20767    pub const DEFAULT: Self = Self {
20768        time_usec: 0_u64,
20769        pos_x: [0.0_f32; 5usize],
20770        pos_y: [0.0_f32; 5usize],
20771        pos_z: [0.0_f32; 5usize],
20772        delta: [0.0_f32; 5usize],
20773        pos_yaw: [0.0_f32; 5usize],
20774        valid_points: 0_u8,
20775    };
20776    #[cfg(feature = "arbitrary")]
20777    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20778        use arbitrary::{Arbitrary, Unstructured};
20779        let mut buf = [0u8; 1024];
20780        rng.fill_bytes(&mut buf);
20781        let mut unstructured = Unstructured::new(&buf);
20782        Self::arbitrary(&mut unstructured).unwrap_or_default()
20783    }
20784}
20785impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
20786    fn default() -> Self {
20787        Self::DEFAULT.clone()
20788    }
20789}
20790impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
20791    type Message = MavMessage;
20792    const ID: u32 = 333u32;
20793    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
20794    const EXTRA_CRC: u8 = 231u8;
20795    const ENCODED_LEN: usize = 109usize;
20796    fn deser(
20797        _version: MavlinkVersion,
20798        __input: &[u8],
20799    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20800        let avail_len = __input.len();
20801        let mut payload_buf = [0; Self::ENCODED_LEN];
20802        let mut buf = if avail_len < Self::ENCODED_LEN {
20803            payload_buf[0..avail_len].copy_from_slice(__input);
20804            Bytes::new(&payload_buf)
20805        } else {
20806            Bytes::new(__input)
20807        };
20808        let mut __struct = Self::default();
20809        __struct.time_usec = buf.get_u64_le();
20810        for v in &mut __struct.pos_x {
20811            let val = buf.get_f32_le();
20812            *v = val;
20813        }
20814        for v in &mut __struct.pos_y {
20815            let val = buf.get_f32_le();
20816            *v = val;
20817        }
20818        for v in &mut __struct.pos_z {
20819            let val = buf.get_f32_le();
20820            *v = val;
20821        }
20822        for v in &mut __struct.delta {
20823            let val = buf.get_f32_le();
20824            *v = val;
20825        }
20826        for v in &mut __struct.pos_yaw {
20827            let val = buf.get_f32_le();
20828            *v = val;
20829        }
20830        __struct.valid_points = buf.get_u8();
20831        Ok(__struct)
20832    }
20833    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20834        let mut __tmp = BytesMut::new(bytes);
20835        #[allow(clippy::absurd_extreme_comparisons)]
20836        #[allow(unused_comparisons)]
20837        if __tmp.remaining() < Self::ENCODED_LEN {
20838            panic!(
20839                "buffer is too small (need {} bytes, but got {})",
20840                Self::ENCODED_LEN,
20841                __tmp.remaining(),
20842            )
20843        }
20844        __tmp.put_u64_le(self.time_usec);
20845        for val in &self.pos_x {
20846            __tmp.put_f32_le(*val);
20847        }
20848        for val in &self.pos_y {
20849            __tmp.put_f32_le(*val);
20850        }
20851        for val in &self.pos_z {
20852            __tmp.put_f32_le(*val);
20853        }
20854        for val in &self.delta {
20855            __tmp.put_f32_le(*val);
20856        }
20857        for val in &self.pos_yaw {
20858            __tmp.put_f32_le(*val);
20859        }
20860        __tmp.put_u8(self.valid_points);
20861        if matches!(version, MavlinkVersion::V2) {
20862            let len = __tmp.len();
20863            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20864        } else {
20865            __tmp.len()
20866        }
20867    }
20868}
20869#[doc = "id: 192"]
20870#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
20871#[derive(Debug, Clone, PartialEq)]
20872#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20873#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20874pub struct MAG_CAL_REPORT_DATA {
20875    #[doc = "RMS milligauss residuals."]
20876    pub fitness: f32,
20877    #[doc = "X offset."]
20878    pub ofs_x: f32,
20879    #[doc = "Y offset."]
20880    pub ofs_y: f32,
20881    #[doc = "Z offset."]
20882    pub ofs_z: f32,
20883    #[doc = "X diagonal (matrix 11)."]
20884    pub diag_x: f32,
20885    #[doc = "Y diagonal (matrix 22)."]
20886    pub diag_y: f32,
20887    #[doc = "Z diagonal (matrix 33)."]
20888    pub diag_z: f32,
20889    #[doc = "X off-diagonal (matrix 12 and 21)."]
20890    pub offdiag_x: f32,
20891    #[doc = "Y off-diagonal (matrix 13 and 31)."]
20892    pub offdiag_y: f32,
20893    #[doc = "Z off-diagonal (matrix 32 and 23)."]
20894    pub offdiag_z: f32,
20895    #[doc = "Compass being calibrated."]
20896    pub compass_id: u8,
20897    #[doc = "Bitmask of compasses being calibrated."]
20898    pub cal_mask: u8,
20899    #[doc = "Calibration Status."]
20900    pub cal_status: MagCalStatus,
20901    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
20902    pub autosaved: u8,
20903    #[doc = "Confidence in orientation (higher is better)."]
20904    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20905    pub orientation_confidence: f32,
20906    #[doc = "orientation before calibration."]
20907    #[cfg_attr(feature = "serde", serde(default))]
20908    pub old_orientation: MavSensorOrientation,
20909    #[doc = "orientation after calibration."]
20910    #[cfg_attr(feature = "serde", serde(default))]
20911    pub new_orientation: MavSensorOrientation,
20912    #[doc = "field radius correction factor"]
20913    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20914    pub scale_factor: f32,
20915}
20916impl MAG_CAL_REPORT_DATA {
20917    pub const ENCODED_LEN: usize = 54usize;
20918    pub const DEFAULT: Self = Self {
20919        fitness: 0.0_f32,
20920        ofs_x: 0.0_f32,
20921        ofs_y: 0.0_f32,
20922        ofs_z: 0.0_f32,
20923        diag_x: 0.0_f32,
20924        diag_y: 0.0_f32,
20925        diag_z: 0.0_f32,
20926        offdiag_x: 0.0_f32,
20927        offdiag_y: 0.0_f32,
20928        offdiag_z: 0.0_f32,
20929        compass_id: 0_u8,
20930        cal_mask: 0_u8,
20931        cal_status: MagCalStatus::DEFAULT,
20932        autosaved: 0_u8,
20933        orientation_confidence: 0.0_f32,
20934        old_orientation: MavSensorOrientation::DEFAULT,
20935        new_orientation: MavSensorOrientation::DEFAULT,
20936        scale_factor: 0.0_f32,
20937    };
20938    #[cfg(feature = "arbitrary")]
20939    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20940        use arbitrary::{Arbitrary, Unstructured};
20941        let mut buf = [0u8; 1024];
20942        rng.fill_bytes(&mut buf);
20943        let mut unstructured = Unstructured::new(&buf);
20944        Self::arbitrary(&mut unstructured).unwrap_or_default()
20945    }
20946}
20947impl Default for MAG_CAL_REPORT_DATA {
20948    fn default() -> Self {
20949        Self::DEFAULT.clone()
20950    }
20951}
20952impl MessageData for MAG_CAL_REPORT_DATA {
20953    type Message = MavMessage;
20954    const ID: u32 = 192u32;
20955    const NAME: &'static str = "MAG_CAL_REPORT";
20956    const EXTRA_CRC: u8 = 36u8;
20957    const ENCODED_LEN: usize = 54usize;
20958    fn deser(
20959        _version: MavlinkVersion,
20960        __input: &[u8],
20961    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20962        let avail_len = __input.len();
20963        let mut payload_buf = [0; Self::ENCODED_LEN];
20964        let mut buf = if avail_len < Self::ENCODED_LEN {
20965            payload_buf[0..avail_len].copy_from_slice(__input);
20966            Bytes::new(&payload_buf)
20967        } else {
20968            Bytes::new(__input)
20969        };
20970        let mut __struct = Self::default();
20971        __struct.fitness = buf.get_f32_le();
20972        __struct.ofs_x = buf.get_f32_le();
20973        __struct.ofs_y = buf.get_f32_le();
20974        __struct.ofs_z = buf.get_f32_le();
20975        __struct.diag_x = buf.get_f32_le();
20976        __struct.diag_y = buf.get_f32_le();
20977        __struct.diag_z = buf.get_f32_le();
20978        __struct.offdiag_x = buf.get_f32_le();
20979        __struct.offdiag_y = buf.get_f32_le();
20980        __struct.offdiag_z = buf.get_f32_le();
20981        __struct.compass_id = buf.get_u8();
20982        __struct.cal_mask = buf.get_u8();
20983        let tmp = buf.get_u8();
20984        __struct.cal_status =
20985            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20986                enum_type: "MagCalStatus",
20987                value: tmp as u32,
20988            })?;
20989        __struct.autosaved = buf.get_u8();
20990        __struct.orientation_confidence = buf.get_f32_le();
20991        let tmp = buf.get_u8();
20992        __struct.old_orientation =
20993            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20994                enum_type: "MavSensorOrientation",
20995                value: tmp as u32,
20996            })?;
20997        let tmp = buf.get_u8();
20998        __struct.new_orientation =
20999            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21000                enum_type: "MavSensorOrientation",
21001                value: tmp as u32,
21002            })?;
21003        __struct.scale_factor = buf.get_f32_le();
21004        Ok(__struct)
21005    }
21006    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21007        let mut __tmp = BytesMut::new(bytes);
21008        #[allow(clippy::absurd_extreme_comparisons)]
21009        #[allow(unused_comparisons)]
21010        if __tmp.remaining() < Self::ENCODED_LEN {
21011            panic!(
21012                "buffer is too small (need {} bytes, but got {})",
21013                Self::ENCODED_LEN,
21014                __tmp.remaining(),
21015            )
21016        }
21017        __tmp.put_f32_le(self.fitness);
21018        __tmp.put_f32_le(self.ofs_x);
21019        __tmp.put_f32_le(self.ofs_y);
21020        __tmp.put_f32_le(self.ofs_z);
21021        __tmp.put_f32_le(self.diag_x);
21022        __tmp.put_f32_le(self.diag_y);
21023        __tmp.put_f32_le(self.diag_z);
21024        __tmp.put_f32_le(self.offdiag_x);
21025        __tmp.put_f32_le(self.offdiag_y);
21026        __tmp.put_f32_le(self.offdiag_z);
21027        __tmp.put_u8(self.compass_id);
21028        __tmp.put_u8(self.cal_mask);
21029        __tmp.put_u8(self.cal_status as u8);
21030        __tmp.put_u8(self.autosaved);
21031        __tmp.put_f32_le(self.orientation_confidence);
21032        __tmp.put_u8(self.old_orientation as u8);
21033        __tmp.put_u8(self.new_orientation as u8);
21034        __tmp.put_f32_le(self.scale_factor);
21035        if matches!(version, MavlinkVersion::V2) {
21036            let len = __tmp.len();
21037            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21038        } else {
21039            __tmp.len()
21040        }
21041    }
21042}
21043#[doc = "id: 286"]
21044#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
21045#[derive(Debug, Clone, PartialEq)]
21046#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21047#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21048pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
21049    #[doc = "Timestamp (time since system boot)."]
21050    pub time_boot_us: u64,
21051    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
21052    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21053    pub q: [f32; 4],
21054    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
21055    pub q_estimated_delay_us: u32,
21056    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
21057    pub vx: f32,
21058    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
21059    pub vy: f32,
21060    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
21061    pub vz: f32,
21062    #[doc = "Estimated delay of the speed data. 0 if unknown."]
21063    pub v_estimated_delay_us: u32,
21064    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
21065    pub feed_forward_angular_velocity_z: f32,
21066    #[doc = "Bitmap indicating which estimator outputs are valid."]
21067    pub estimator_status: EstimatorStatusFlags,
21068    #[doc = "System ID"]
21069    pub target_system: u8,
21070    #[doc = "Component ID"]
21071    pub target_component: u8,
21072    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
21073    pub landed_state: MavLandedState,
21074    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
21075    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21076    pub angular_velocity_z: f32,
21077}
21078impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
21079    pub const ENCODED_LEN: usize = 57usize;
21080    pub const DEFAULT: Self = Self {
21081        time_boot_us: 0_u64,
21082        q: [0.0_f32; 4usize],
21083        q_estimated_delay_us: 0_u32,
21084        vx: 0.0_f32,
21085        vy: 0.0_f32,
21086        vz: 0.0_f32,
21087        v_estimated_delay_us: 0_u32,
21088        feed_forward_angular_velocity_z: 0.0_f32,
21089        estimator_status: EstimatorStatusFlags::DEFAULT,
21090        target_system: 0_u8,
21091        target_component: 0_u8,
21092        landed_state: MavLandedState::DEFAULT,
21093        angular_velocity_z: 0.0_f32,
21094    };
21095    #[cfg(feature = "arbitrary")]
21096    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21097        use arbitrary::{Arbitrary, Unstructured};
21098        let mut buf = [0u8; 1024];
21099        rng.fill_bytes(&mut buf);
21100        let mut unstructured = Unstructured::new(&buf);
21101        Self::arbitrary(&mut unstructured).unwrap_or_default()
21102    }
21103}
21104impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
21105    fn default() -> Self {
21106        Self::DEFAULT.clone()
21107    }
21108}
21109impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
21110    type Message = MavMessage;
21111    const ID: u32 = 286u32;
21112    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
21113    const EXTRA_CRC: u8 = 210u8;
21114    const ENCODED_LEN: usize = 57usize;
21115    fn deser(
21116        _version: MavlinkVersion,
21117        __input: &[u8],
21118    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21119        let avail_len = __input.len();
21120        let mut payload_buf = [0; Self::ENCODED_LEN];
21121        let mut buf = if avail_len < Self::ENCODED_LEN {
21122            payload_buf[0..avail_len].copy_from_slice(__input);
21123            Bytes::new(&payload_buf)
21124        } else {
21125            Bytes::new(__input)
21126        };
21127        let mut __struct = Self::default();
21128        __struct.time_boot_us = buf.get_u64_le();
21129        for v in &mut __struct.q {
21130            let val = buf.get_f32_le();
21131            *v = val;
21132        }
21133        __struct.q_estimated_delay_us = buf.get_u32_le();
21134        __struct.vx = buf.get_f32_le();
21135        __struct.vy = buf.get_f32_le();
21136        __struct.vz = buf.get_f32_le();
21137        __struct.v_estimated_delay_us = buf.get_u32_le();
21138        __struct.feed_forward_angular_velocity_z = buf.get_f32_le();
21139        let tmp = buf.get_u16_le();
21140        __struct.estimator_status = EstimatorStatusFlags::from_bits(
21141            tmp & EstimatorStatusFlags::all().bits(),
21142        )
21143        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
21144            flag_type: "EstimatorStatusFlags",
21145            value: tmp as u32,
21146        })?;
21147        __struct.target_system = buf.get_u8();
21148        __struct.target_component = buf.get_u8();
21149        let tmp = buf.get_u8();
21150        __struct.landed_state =
21151            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21152                enum_type: "MavLandedState",
21153                value: tmp as u32,
21154            })?;
21155        __struct.angular_velocity_z = buf.get_f32_le();
21156        Ok(__struct)
21157    }
21158    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21159        let mut __tmp = BytesMut::new(bytes);
21160        #[allow(clippy::absurd_extreme_comparisons)]
21161        #[allow(unused_comparisons)]
21162        if __tmp.remaining() < Self::ENCODED_LEN {
21163            panic!(
21164                "buffer is too small (need {} bytes, but got {})",
21165                Self::ENCODED_LEN,
21166                __tmp.remaining(),
21167            )
21168        }
21169        __tmp.put_u64_le(self.time_boot_us);
21170        for val in &self.q {
21171            __tmp.put_f32_le(*val);
21172        }
21173        __tmp.put_u32_le(self.q_estimated_delay_us);
21174        __tmp.put_f32_le(self.vx);
21175        __tmp.put_f32_le(self.vy);
21176        __tmp.put_f32_le(self.vz);
21177        __tmp.put_u32_le(self.v_estimated_delay_us);
21178        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
21179        __tmp.put_u16_le(self.estimator_status.bits());
21180        __tmp.put_u8(self.target_system);
21181        __tmp.put_u8(self.target_component);
21182        __tmp.put_u8(self.landed_state as u8);
21183        __tmp.put_f32_le(self.angular_velocity_z);
21184        if matches!(version, MavlinkVersion::V2) {
21185            let len = __tmp.len();
21186            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21187        } else {
21188            __tmp.len()
21189        }
21190    }
21191}
21192#[doc = "id: 28"]
21193#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
21194#[derive(Debug, Clone, PartialEq)]
21195#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21196#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21197pub struct RAW_PRESSURE_DATA {
21198    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21199    pub time_usec: u64,
21200    #[doc = "Absolute pressure (raw)"]
21201    pub press_abs: i16,
21202    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
21203    pub press_diff1: i16,
21204    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
21205    pub press_diff2: i16,
21206    #[doc = "Raw Temperature measurement (raw)"]
21207    pub temperature: i16,
21208}
21209impl RAW_PRESSURE_DATA {
21210    pub const ENCODED_LEN: usize = 16usize;
21211    pub const DEFAULT: Self = Self {
21212        time_usec: 0_u64,
21213        press_abs: 0_i16,
21214        press_diff1: 0_i16,
21215        press_diff2: 0_i16,
21216        temperature: 0_i16,
21217    };
21218    #[cfg(feature = "arbitrary")]
21219    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21220        use arbitrary::{Arbitrary, Unstructured};
21221        let mut buf = [0u8; 1024];
21222        rng.fill_bytes(&mut buf);
21223        let mut unstructured = Unstructured::new(&buf);
21224        Self::arbitrary(&mut unstructured).unwrap_or_default()
21225    }
21226}
21227impl Default for RAW_PRESSURE_DATA {
21228    fn default() -> Self {
21229        Self::DEFAULT.clone()
21230    }
21231}
21232impl MessageData for RAW_PRESSURE_DATA {
21233    type Message = MavMessage;
21234    const ID: u32 = 28u32;
21235    const NAME: &'static str = "RAW_PRESSURE";
21236    const EXTRA_CRC: u8 = 67u8;
21237    const ENCODED_LEN: usize = 16usize;
21238    fn deser(
21239        _version: MavlinkVersion,
21240        __input: &[u8],
21241    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21242        let avail_len = __input.len();
21243        let mut payload_buf = [0; Self::ENCODED_LEN];
21244        let mut buf = if avail_len < Self::ENCODED_LEN {
21245            payload_buf[0..avail_len].copy_from_slice(__input);
21246            Bytes::new(&payload_buf)
21247        } else {
21248            Bytes::new(__input)
21249        };
21250        let mut __struct = Self::default();
21251        __struct.time_usec = buf.get_u64_le();
21252        __struct.press_abs = buf.get_i16_le();
21253        __struct.press_diff1 = buf.get_i16_le();
21254        __struct.press_diff2 = buf.get_i16_le();
21255        __struct.temperature = buf.get_i16_le();
21256        Ok(__struct)
21257    }
21258    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21259        let mut __tmp = BytesMut::new(bytes);
21260        #[allow(clippy::absurd_extreme_comparisons)]
21261        #[allow(unused_comparisons)]
21262        if __tmp.remaining() < Self::ENCODED_LEN {
21263            panic!(
21264                "buffer is too small (need {} bytes, but got {})",
21265                Self::ENCODED_LEN,
21266                __tmp.remaining(),
21267            )
21268        }
21269        __tmp.put_u64_le(self.time_usec);
21270        __tmp.put_i16_le(self.press_abs);
21271        __tmp.put_i16_le(self.press_diff1);
21272        __tmp.put_i16_le(self.press_diff2);
21273        __tmp.put_i16_le(self.temperature);
21274        if matches!(version, MavlinkVersion::V2) {
21275            let len = __tmp.len();
21276            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21277        } else {
21278            __tmp.len()
21279        }
21280    }
21281}
21282#[doc = "id: 124"]
21283#[doc = "Second GPS data."]
21284#[derive(Debug, Clone, PartialEq)]
21285#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21286#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21287pub struct GPS2_RAW_DATA {
21288    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21289    pub time_usec: u64,
21290    #[doc = "Latitude (WGS84)"]
21291    pub lat: i32,
21292    #[doc = "Longitude (WGS84)"]
21293    pub lon: i32,
21294    #[doc = "Altitude (MSL). Positive for up."]
21295    pub alt: i32,
21296    #[doc = "Age of DGPS info"]
21297    pub dgps_age: u32,
21298    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
21299    pub eph: u16,
21300    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
21301    pub epv: u16,
21302    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
21303    pub vel: u16,
21304    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
21305    pub cog: u16,
21306    #[doc = "GPS fix type."]
21307    pub fix_type: GpsFixType,
21308    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
21309    pub satellites_visible: u8,
21310    #[doc = "Number of DGPS satellites"]
21311    pub dgps_numch: u8,
21312    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
21313    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21314    pub yaw: u16,
21315    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
21316    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21317    pub alt_ellipsoid: i32,
21318    #[doc = "Position uncertainty."]
21319    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21320    pub h_acc: u32,
21321    #[doc = "Altitude uncertainty."]
21322    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21323    pub v_acc: u32,
21324    #[doc = "Speed uncertainty."]
21325    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21326    pub vel_acc: u32,
21327    #[doc = "Heading / track uncertainty"]
21328    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21329    pub hdg_acc: u32,
21330}
21331impl GPS2_RAW_DATA {
21332    pub const ENCODED_LEN: usize = 57usize;
21333    pub const DEFAULT: Self = Self {
21334        time_usec: 0_u64,
21335        lat: 0_i32,
21336        lon: 0_i32,
21337        alt: 0_i32,
21338        dgps_age: 0_u32,
21339        eph: 0_u16,
21340        epv: 0_u16,
21341        vel: 0_u16,
21342        cog: 0_u16,
21343        fix_type: GpsFixType::DEFAULT,
21344        satellites_visible: 0_u8,
21345        dgps_numch: 0_u8,
21346        yaw: 0_u16,
21347        alt_ellipsoid: 0_i32,
21348        h_acc: 0_u32,
21349        v_acc: 0_u32,
21350        vel_acc: 0_u32,
21351        hdg_acc: 0_u32,
21352    };
21353    #[cfg(feature = "arbitrary")]
21354    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21355        use arbitrary::{Arbitrary, Unstructured};
21356        let mut buf = [0u8; 1024];
21357        rng.fill_bytes(&mut buf);
21358        let mut unstructured = Unstructured::new(&buf);
21359        Self::arbitrary(&mut unstructured).unwrap_or_default()
21360    }
21361}
21362impl Default for GPS2_RAW_DATA {
21363    fn default() -> Self {
21364        Self::DEFAULT.clone()
21365    }
21366}
21367impl MessageData for GPS2_RAW_DATA {
21368    type Message = MavMessage;
21369    const ID: u32 = 124u32;
21370    const NAME: &'static str = "GPS2_RAW";
21371    const EXTRA_CRC: u8 = 87u8;
21372    const ENCODED_LEN: usize = 57usize;
21373    fn deser(
21374        _version: MavlinkVersion,
21375        __input: &[u8],
21376    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21377        let avail_len = __input.len();
21378        let mut payload_buf = [0; Self::ENCODED_LEN];
21379        let mut buf = if avail_len < Self::ENCODED_LEN {
21380            payload_buf[0..avail_len].copy_from_slice(__input);
21381            Bytes::new(&payload_buf)
21382        } else {
21383            Bytes::new(__input)
21384        };
21385        let mut __struct = Self::default();
21386        __struct.time_usec = buf.get_u64_le();
21387        __struct.lat = buf.get_i32_le();
21388        __struct.lon = buf.get_i32_le();
21389        __struct.alt = buf.get_i32_le();
21390        __struct.dgps_age = buf.get_u32_le();
21391        __struct.eph = buf.get_u16_le();
21392        __struct.epv = buf.get_u16_le();
21393        __struct.vel = buf.get_u16_le();
21394        __struct.cog = buf.get_u16_le();
21395        let tmp = buf.get_u8();
21396        __struct.fix_type =
21397            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21398                enum_type: "GpsFixType",
21399                value: tmp as u32,
21400            })?;
21401        __struct.satellites_visible = buf.get_u8();
21402        __struct.dgps_numch = buf.get_u8();
21403        __struct.yaw = buf.get_u16_le();
21404        __struct.alt_ellipsoid = buf.get_i32_le();
21405        __struct.h_acc = buf.get_u32_le();
21406        __struct.v_acc = buf.get_u32_le();
21407        __struct.vel_acc = buf.get_u32_le();
21408        __struct.hdg_acc = buf.get_u32_le();
21409        Ok(__struct)
21410    }
21411    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21412        let mut __tmp = BytesMut::new(bytes);
21413        #[allow(clippy::absurd_extreme_comparisons)]
21414        #[allow(unused_comparisons)]
21415        if __tmp.remaining() < Self::ENCODED_LEN {
21416            panic!(
21417                "buffer is too small (need {} bytes, but got {})",
21418                Self::ENCODED_LEN,
21419                __tmp.remaining(),
21420            )
21421        }
21422        __tmp.put_u64_le(self.time_usec);
21423        __tmp.put_i32_le(self.lat);
21424        __tmp.put_i32_le(self.lon);
21425        __tmp.put_i32_le(self.alt);
21426        __tmp.put_u32_le(self.dgps_age);
21427        __tmp.put_u16_le(self.eph);
21428        __tmp.put_u16_le(self.epv);
21429        __tmp.put_u16_le(self.vel);
21430        __tmp.put_u16_le(self.cog);
21431        __tmp.put_u8(self.fix_type as u8);
21432        __tmp.put_u8(self.satellites_visible);
21433        __tmp.put_u8(self.dgps_numch);
21434        __tmp.put_u16_le(self.yaw);
21435        __tmp.put_i32_le(self.alt_ellipsoid);
21436        __tmp.put_u32_le(self.h_acc);
21437        __tmp.put_u32_le(self.v_acc);
21438        __tmp.put_u32_le(self.vel_acc);
21439        __tmp.put_u32_le(self.hdg_acc);
21440        if matches!(version, MavlinkVersion::V2) {
21441            let len = __tmp.len();
21442            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21443        } else {
21444            __tmp.len()
21445        }
21446    }
21447}
21448#[doc = "id: 340"]
21449#[doc = "The global position resulting from GPS and sensor fusion."]
21450#[derive(Debug, Clone, PartialEq)]
21451#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21452#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21453pub struct UTM_GLOBAL_POSITION_DATA {
21454    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
21455    pub time: u64,
21456    #[doc = "Latitude (WGS84)"]
21457    pub lat: i32,
21458    #[doc = "Longitude (WGS84)"]
21459    pub lon: i32,
21460    #[doc = "Altitude (WGS84)"]
21461    pub alt: i32,
21462    #[doc = "Altitude above ground"]
21463    pub relative_alt: i32,
21464    #[doc = "Next waypoint, latitude (WGS84)"]
21465    pub next_lat: i32,
21466    #[doc = "Next waypoint, longitude (WGS84)"]
21467    pub next_lon: i32,
21468    #[doc = "Next waypoint, altitude (WGS84)"]
21469    pub next_alt: i32,
21470    #[doc = "Ground X speed (latitude, positive north)"]
21471    pub vx: i16,
21472    #[doc = "Ground Y speed (longitude, positive east)"]
21473    pub vy: i16,
21474    #[doc = "Ground Z speed (altitude, positive down)"]
21475    pub vz: i16,
21476    #[doc = "Horizontal position uncertainty (standard deviation)"]
21477    pub h_acc: u16,
21478    #[doc = "Altitude uncertainty (standard deviation)"]
21479    pub v_acc: u16,
21480    #[doc = "Speed uncertainty (standard deviation)"]
21481    pub vel_acc: u16,
21482    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
21483    pub update_rate: u16,
21484    #[doc = "Unique UAS ID."]
21485    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21486    pub uas_id: [u8; 18],
21487    #[doc = "Flight state"]
21488    pub flight_state: UtmFlightState,
21489    #[doc = "Bitwise OR combination of the data available flags."]
21490    pub flags: UtmDataAvailFlags,
21491}
21492impl UTM_GLOBAL_POSITION_DATA {
21493    pub const ENCODED_LEN: usize = 70usize;
21494    pub const DEFAULT: Self = Self {
21495        time: 0_u64,
21496        lat: 0_i32,
21497        lon: 0_i32,
21498        alt: 0_i32,
21499        relative_alt: 0_i32,
21500        next_lat: 0_i32,
21501        next_lon: 0_i32,
21502        next_alt: 0_i32,
21503        vx: 0_i16,
21504        vy: 0_i16,
21505        vz: 0_i16,
21506        h_acc: 0_u16,
21507        v_acc: 0_u16,
21508        vel_acc: 0_u16,
21509        update_rate: 0_u16,
21510        uas_id: [0_u8; 18usize],
21511        flight_state: UtmFlightState::DEFAULT,
21512        flags: UtmDataAvailFlags::DEFAULT,
21513    };
21514    #[cfg(feature = "arbitrary")]
21515    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21516        use arbitrary::{Arbitrary, Unstructured};
21517        let mut buf = [0u8; 1024];
21518        rng.fill_bytes(&mut buf);
21519        let mut unstructured = Unstructured::new(&buf);
21520        Self::arbitrary(&mut unstructured).unwrap_or_default()
21521    }
21522}
21523impl Default for UTM_GLOBAL_POSITION_DATA {
21524    fn default() -> Self {
21525        Self::DEFAULT.clone()
21526    }
21527}
21528impl MessageData for UTM_GLOBAL_POSITION_DATA {
21529    type Message = MavMessage;
21530    const ID: u32 = 340u32;
21531    const NAME: &'static str = "UTM_GLOBAL_POSITION";
21532    const EXTRA_CRC: u8 = 99u8;
21533    const ENCODED_LEN: usize = 70usize;
21534    fn deser(
21535        _version: MavlinkVersion,
21536        __input: &[u8],
21537    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21538        let avail_len = __input.len();
21539        let mut payload_buf = [0; Self::ENCODED_LEN];
21540        let mut buf = if avail_len < Self::ENCODED_LEN {
21541            payload_buf[0..avail_len].copy_from_slice(__input);
21542            Bytes::new(&payload_buf)
21543        } else {
21544            Bytes::new(__input)
21545        };
21546        let mut __struct = Self::default();
21547        __struct.time = buf.get_u64_le();
21548        __struct.lat = buf.get_i32_le();
21549        __struct.lon = buf.get_i32_le();
21550        __struct.alt = buf.get_i32_le();
21551        __struct.relative_alt = buf.get_i32_le();
21552        __struct.next_lat = buf.get_i32_le();
21553        __struct.next_lon = buf.get_i32_le();
21554        __struct.next_alt = buf.get_i32_le();
21555        __struct.vx = buf.get_i16_le();
21556        __struct.vy = buf.get_i16_le();
21557        __struct.vz = buf.get_i16_le();
21558        __struct.h_acc = buf.get_u16_le();
21559        __struct.v_acc = buf.get_u16_le();
21560        __struct.vel_acc = buf.get_u16_le();
21561        __struct.update_rate = buf.get_u16_le();
21562        for v in &mut __struct.uas_id {
21563            let val = buf.get_u8();
21564            *v = val;
21565        }
21566        let tmp = buf.get_u8();
21567        __struct.flight_state =
21568            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21569                enum_type: "UtmFlightState",
21570                value: tmp as u32,
21571            })?;
21572        let tmp = buf.get_u8();
21573        __struct.flags = UtmDataAvailFlags::from_bits(tmp & UtmDataAvailFlags::all().bits())
21574            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
21575                flag_type: "UtmDataAvailFlags",
21576                value: tmp as u32,
21577            })?;
21578        Ok(__struct)
21579    }
21580    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21581        let mut __tmp = BytesMut::new(bytes);
21582        #[allow(clippy::absurd_extreme_comparisons)]
21583        #[allow(unused_comparisons)]
21584        if __tmp.remaining() < Self::ENCODED_LEN {
21585            panic!(
21586                "buffer is too small (need {} bytes, but got {})",
21587                Self::ENCODED_LEN,
21588                __tmp.remaining(),
21589            )
21590        }
21591        __tmp.put_u64_le(self.time);
21592        __tmp.put_i32_le(self.lat);
21593        __tmp.put_i32_le(self.lon);
21594        __tmp.put_i32_le(self.alt);
21595        __tmp.put_i32_le(self.relative_alt);
21596        __tmp.put_i32_le(self.next_lat);
21597        __tmp.put_i32_le(self.next_lon);
21598        __tmp.put_i32_le(self.next_alt);
21599        __tmp.put_i16_le(self.vx);
21600        __tmp.put_i16_le(self.vy);
21601        __tmp.put_i16_le(self.vz);
21602        __tmp.put_u16_le(self.h_acc);
21603        __tmp.put_u16_le(self.v_acc);
21604        __tmp.put_u16_le(self.vel_acc);
21605        __tmp.put_u16_le(self.update_rate);
21606        for val in &self.uas_id {
21607            __tmp.put_u8(*val);
21608        }
21609        __tmp.put_u8(self.flight_state as u8);
21610        __tmp.put_u8(self.flags.bits());
21611        if matches!(version, MavlinkVersion::V2) {
21612            let len = __tmp.len();
21613            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21614        } else {
21615            __tmp.len()
21616        }
21617    }
21618}
21619#[doc = "id: 291"]
21620#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
21621#[derive(Debug, Clone, PartialEq)]
21622#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21623#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21624pub struct ESC_STATUS_DATA {
21625    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
21626    pub time_usec: u64,
21627    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
21628    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21629    pub rpm: [i32; 4],
21630    #[doc = "Voltage measured from each ESC."]
21631    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21632    pub voltage: [f32; 4],
21633    #[doc = "Current measured from each ESC."]
21634    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21635    pub current: [f32; 4],
21636    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
21637    pub index: u8,
21638}
21639impl ESC_STATUS_DATA {
21640    pub const ENCODED_LEN: usize = 57usize;
21641    pub const DEFAULT: Self = Self {
21642        time_usec: 0_u64,
21643        rpm: [0_i32; 4usize],
21644        voltage: [0.0_f32; 4usize],
21645        current: [0.0_f32; 4usize],
21646        index: 0_u8,
21647    };
21648    #[cfg(feature = "arbitrary")]
21649    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21650        use arbitrary::{Arbitrary, Unstructured};
21651        let mut buf = [0u8; 1024];
21652        rng.fill_bytes(&mut buf);
21653        let mut unstructured = Unstructured::new(&buf);
21654        Self::arbitrary(&mut unstructured).unwrap_or_default()
21655    }
21656}
21657impl Default for ESC_STATUS_DATA {
21658    fn default() -> Self {
21659        Self::DEFAULT.clone()
21660    }
21661}
21662impl MessageData for ESC_STATUS_DATA {
21663    type Message = MavMessage;
21664    const ID: u32 = 291u32;
21665    const NAME: &'static str = "ESC_STATUS";
21666    const EXTRA_CRC: u8 = 10u8;
21667    const ENCODED_LEN: usize = 57usize;
21668    fn deser(
21669        _version: MavlinkVersion,
21670        __input: &[u8],
21671    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21672        let avail_len = __input.len();
21673        let mut payload_buf = [0; Self::ENCODED_LEN];
21674        let mut buf = if avail_len < Self::ENCODED_LEN {
21675            payload_buf[0..avail_len].copy_from_slice(__input);
21676            Bytes::new(&payload_buf)
21677        } else {
21678            Bytes::new(__input)
21679        };
21680        let mut __struct = Self::default();
21681        __struct.time_usec = buf.get_u64_le();
21682        for v in &mut __struct.rpm {
21683            let val = buf.get_i32_le();
21684            *v = val;
21685        }
21686        for v in &mut __struct.voltage {
21687            let val = buf.get_f32_le();
21688            *v = val;
21689        }
21690        for v in &mut __struct.current {
21691            let val = buf.get_f32_le();
21692            *v = val;
21693        }
21694        __struct.index = buf.get_u8();
21695        Ok(__struct)
21696    }
21697    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21698        let mut __tmp = BytesMut::new(bytes);
21699        #[allow(clippy::absurd_extreme_comparisons)]
21700        #[allow(unused_comparisons)]
21701        if __tmp.remaining() < Self::ENCODED_LEN {
21702            panic!(
21703                "buffer is too small (need {} bytes, but got {})",
21704                Self::ENCODED_LEN,
21705                __tmp.remaining(),
21706            )
21707        }
21708        __tmp.put_u64_le(self.time_usec);
21709        for val in &self.rpm {
21710            __tmp.put_i32_le(*val);
21711        }
21712        for val in &self.voltage {
21713            __tmp.put_f32_le(*val);
21714        }
21715        for val in &self.current {
21716            __tmp.put_f32_le(*val);
21717        }
21718        __tmp.put_u8(self.index);
21719        if matches!(version, MavlinkVersion::V2) {
21720            let len = __tmp.len();
21721            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21722        } else {
21723            __tmp.len()
21724        }
21725    }
21726}
21727#[doc = "id: 411"]
21728#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
21729#[derive(Debug, Clone, PartialEq)]
21730#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21731#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21732pub struct CURRENT_EVENT_SEQUENCE_DATA {
21733    #[doc = "Sequence number."]
21734    pub sequence: u16,
21735    #[doc = "Flag bitset."]
21736    pub flags: MavEventCurrentSequenceFlags,
21737}
21738impl CURRENT_EVENT_SEQUENCE_DATA {
21739    pub const ENCODED_LEN: usize = 3usize;
21740    pub const DEFAULT: Self = Self {
21741        sequence: 0_u16,
21742        flags: MavEventCurrentSequenceFlags::DEFAULT,
21743    };
21744    #[cfg(feature = "arbitrary")]
21745    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21746        use arbitrary::{Arbitrary, Unstructured};
21747        let mut buf = [0u8; 1024];
21748        rng.fill_bytes(&mut buf);
21749        let mut unstructured = Unstructured::new(&buf);
21750        Self::arbitrary(&mut unstructured).unwrap_or_default()
21751    }
21752}
21753impl Default for CURRENT_EVENT_SEQUENCE_DATA {
21754    fn default() -> Self {
21755        Self::DEFAULT.clone()
21756    }
21757}
21758impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
21759    type Message = MavMessage;
21760    const ID: u32 = 411u32;
21761    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
21762    const EXTRA_CRC: u8 = 106u8;
21763    const ENCODED_LEN: usize = 3usize;
21764    fn deser(
21765        _version: MavlinkVersion,
21766        __input: &[u8],
21767    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21768        let avail_len = __input.len();
21769        let mut payload_buf = [0; Self::ENCODED_LEN];
21770        let mut buf = if avail_len < Self::ENCODED_LEN {
21771            payload_buf[0..avail_len].copy_from_slice(__input);
21772            Bytes::new(&payload_buf)
21773        } else {
21774            Bytes::new(__input)
21775        };
21776        let mut __struct = Self::default();
21777        __struct.sequence = buf.get_u16_le();
21778        let tmp = buf.get_u8();
21779        __struct.flags =
21780            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21781                enum_type: "MavEventCurrentSequenceFlags",
21782                value: tmp as u32,
21783            })?;
21784        Ok(__struct)
21785    }
21786    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21787        let mut __tmp = BytesMut::new(bytes);
21788        #[allow(clippy::absurd_extreme_comparisons)]
21789        #[allow(unused_comparisons)]
21790        if __tmp.remaining() < Self::ENCODED_LEN {
21791            panic!(
21792                "buffer is too small (need {} bytes, but got {})",
21793                Self::ENCODED_LEN,
21794                __tmp.remaining(),
21795            )
21796        }
21797        __tmp.put_u16_le(self.sequence);
21798        __tmp.put_u8(self.flags as u8);
21799        if matches!(version, MavlinkVersion::V2) {
21800            let len = __tmp.len();
21801            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21802        } else {
21803            __tmp.len()
21804        }
21805    }
21806}
21807#[doc = "id: 336"]
21808#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
21809#[derive(Debug, Clone, PartialEq)]
21810#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21811#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21812pub struct CELLULAR_CONFIG_DATA {
21813    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
21814    pub enable_lte: u8,
21815    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
21816    pub enable_pin: u8,
21817    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
21818    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21819    pub pin: [u8; 16],
21820    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
21821    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21822    pub new_pin: [u8; 16],
21823    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
21824    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21825    pub apn: [u8; 32],
21826    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
21827    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21828    pub puk: [u8; 16],
21829    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
21830    pub roaming: u8,
21831    #[doc = "Message acceptance response (sent back to GS)."]
21832    pub response: CellularConfigResponse,
21833}
21834impl CELLULAR_CONFIG_DATA {
21835    pub const ENCODED_LEN: usize = 84usize;
21836    pub const DEFAULT: Self = Self {
21837        enable_lte: 0_u8,
21838        enable_pin: 0_u8,
21839        pin: [0_u8; 16usize],
21840        new_pin: [0_u8; 16usize],
21841        apn: [0_u8; 32usize],
21842        puk: [0_u8; 16usize],
21843        roaming: 0_u8,
21844        response: CellularConfigResponse::DEFAULT,
21845    };
21846    #[cfg(feature = "arbitrary")]
21847    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21848        use arbitrary::{Arbitrary, Unstructured};
21849        let mut buf = [0u8; 1024];
21850        rng.fill_bytes(&mut buf);
21851        let mut unstructured = Unstructured::new(&buf);
21852        Self::arbitrary(&mut unstructured).unwrap_or_default()
21853    }
21854}
21855impl Default for CELLULAR_CONFIG_DATA {
21856    fn default() -> Self {
21857        Self::DEFAULT.clone()
21858    }
21859}
21860impl MessageData for CELLULAR_CONFIG_DATA {
21861    type Message = MavMessage;
21862    const ID: u32 = 336u32;
21863    const NAME: &'static str = "CELLULAR_CONFIG";
21864    const EXTRA_CRC: u8 = 245u8;
21865    const ENCODED_LEN: usize = 84usize;
21866    fn deser(
21867        _version: MavlinkVersion,
21868        __input: &[u8],
21869    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21870        let avail_len = __input.len();
21871        let mut payload_buf = [0; Self::ENCODED_LEN];
21872        let mut buf = if avail_len < Self::ENCODED_LEN {
21873            payload_buf[0..avail_len].copy_from_slice(__input);
21874            Bytes::new(&payload_buf)
21875        } else {
21876            Bytes::new(__input)
21877        };
21878        let mut __struct = Self::default();
21879        __struct.enable_lte = buf.get_u8();
21880        __struct.enable_pin = buf.get_u8();
21881        for v in &mut __struct.pin {
21882            let val = buf.get_u8();
21883            *v = val;
21884        }
21885        for v in &mut __struct.new_pin {
21886            let val = buf.get_u8();
21887            *v = val;
21888        }
21889        for v in &mut __struct.apn {
21890            let val = buf.get_u8();
21891            *v = val;
21892        }
21893        for v in &mut __struct.puk {
21894            let val = buf.get_u8();
21895            *v = val;
21896        }
21897        __struct.roaming = buf.get_u8();
21898        let tmp = buf.get_u8();
21899        __struct.response =
21900            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21901                enum_type: "CellularConfigResponse",
21902                value: tmp as u32,
21903            })?;
21904        Ok(__struct)
21905    }
21906    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21907        let mut __tmp = BytesMut::new(bytes);
21908        #[allow(clippy::absurd_extreme_comparisons)]
21909        #[allow(unused_comparisons)]
21910        if __tmp.remaining() < Self::ENCODED_LEN {
21911            panic!(
21912                "buffer is too small (need {} bytes, but got {})",
21913                Self::ENCODED_LEN,
21914                __tmp.remaining(),
21915            )
21916        }
21917        __tmp.put_u8(self.enable_lte);
21918        __tmp.put_u8(self.enable_pin);
21919        for val in &self.pin {
21920            __tmp.put_u8(*val);
21921        }
21922        for val in &self.new_pin {
21923            __tmp.put_u8(*val);
21924        }
21925        for val in &self.apn {
21926            __tmp.put_u8(*val);
21927        }
21928        for val in &self.puk {
21929            __tmp.put_u8(*val);
21930        }
21931        __tmp.put_u8(self.roaming);
21932        __tmp.put_u8(self.response as u8);
21933        if matches!(version, MavlinkVersion::V2) {
21934            let len = __tmp.len();
21935            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21936        } else {
21937            __tmp.len()
21938        }
21939    }
21940}
21941#[doc = "id: 334"]
21942#[doc = "Report current used cellular network status."]
21943#[derive(Debug, Clone, PartialEq)]
21944#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21945#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21946pub struct CELLULAR_STATUS_DATA {
21947    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
21948    pub mcc: u16,
21949    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
21950    pub mnc: u16,
21951    #[doc = "Location area code. If unknown, set to 0"]
21952    pub lac: u16,
21953    #[doc = "Cellular modem status"]
21954    pub status: CellularStatusFlag,
21955    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
21956    pub failure_reason: CellularNetworkFailedReason,
21957    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
21958    pub mavtype: CellularNetworkRadioType,
21959    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
21960    pub quality: u8,
21961}
21962impl CELLULAR_STATUS_DATA {
21963    pub const ENCODED_LEN: usize = 10usize;
21964    pub const DEFAULT: Self = Self {
21965        mcc: 0_u16,
21966        mnc: 0_u16,
21967        lac: 0_u16,
21968        status: CellularStatusFlag::DEFAULT,
21969        failure_reason: CellularNetworkFailedReason::DEFAULT,
21970        mavtype: CellularNetworkRadioType::DEFAULT,
21971        quality: 0_u8,
21972    };
21973    #[cfg(feature = "arbitrary")]
21974    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21975        use arbitrary::{Arbitrary, Unstructured};
21976        let mut buf = [0u8; 1024];
21977        rng.fill_bytes(&mut buf);
21978        let mut unstructured = Unstructured::new(&buf);
21979        Self::arbitrary(&mut unstructured).unwrap_or_default()
21980    }
21981}
21982impl Default for CELLULAR_STATUS_DATA {
21983    fn default() -> Self {
21984        Self::DEFAULT.clone()
21985    }
21986}
21987impl MessageData for CELLULAR_STATUS_DATA {
21988    type Message = MavMessage;
21989    const ID: u32 = 334u32;
21990    const NAME: &'static str = "CELLULAR_STATUS";
21991    const EXTRA_CRC: u8 = 72u8;
21992    const ENCODED_LEN: usize = 10usize;
21993    fn deser(
21994        _version: MavlinkVersion,
21995        __input: &[u8],
21996    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21997        let avail_len = __input.len();
21998        let mut payload_buf = [0; Self::ENCODED_LEN];
21999        let mut buf = if avail_len < Self::ENCODED_LEN {
22000            payload_buf[0..avail_len].copy_from_slice(__input);
22001            Bytes::new(&payload_buf)
22002        } else {
22003            Bytes::new(__input)
22004        };
22005        let mut __struct = Self::default();
22006        __struct.mcc = buf.get_u16_le();
22007        __struct.mnc = buf.get_u16_le();
22008        __struct.lac = buf.get_u16_le();
22009        let tmp = buf.get_u8();
22010        __struct.status =
22011            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22012                enum_type: "CellularStatusFlag",
22013                value: tmp as u32,
22014            })?;
22015        let tmp = buf.get_u8();
22016        __struct.failure_reason =
22017            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22018                enum_type: "CellularNetworkFailedReason",
22019                value: tmp as u32,
22020            })?;
22021        let tmp = buf.get_u8();
22022        __struct.mavtype =
22023            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22024                enum_type: "CellularNetworkRadioType",
22025                value: tmp as u32,
22026            })?;
22027        __struct.quality = buf.get_u8();
22028        Ok(__struct)
22029    }
22030    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22031        let mut __tmp = BytesMut::new(bytes);
22032        #[allow(clippy::absurd_extreme_comparisons)]
22033        #[allow(unused_comparisons)]
22034        if __tmp.remaining() < Self::ENCODED_LEN {
22035            panic!(
22036                "buffer is too small (need {} bytes, but got {})",
22037                Self::ENCODED_LEN,
22038                __tmp.remaining(),
22039            )
22040        }
22041        __tmp.put_u16_le(self.mcc);
22042        __tmp.put_u16_le(self.mnc);
22043        __tmp.put_u16_le(self.lac);
22044        __tmp.put_u8(self.status as u8);
22045        __tmp.put_u8(self.failure_reason as u8);
22046        __tmp.put_u8(self.mavtype as u8);
22047        __tmp.put_u8(self.quality);
22048        if matches!(version, MavlinkVersion::V2) {
22049            let len = __tmp.len();
22050            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22051        } else {
22052            __tmp.len()
22053        }
22054    }
22055}
22056#[doc = "id: 91"]
22057#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
22058#[derive(Debug, Clone, PartialEq)]
22059#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22060#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22061pub struct HIL_CONTROLS_DATA {
22062    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22063    pub time_usec: u64,
22064    #[doc = "Control output -1 .. 1"]
22065    pub roll_ailerons: f32,
22066    #[doc = "Control output -1 .. 1"]
22067    pub pitch_elevator: f32,
22068    #[doc = "Control output -1 .. 1"]
22069    pub yaw_rudder: f32,
22070    #[doc = "Throttle 0 .. 1"]
22071    pub throttle: f32,
22072    #[doc = "Aux 1, -1 .. 1"]
22073    pub aux1: f32,
22074    #[doc = "Aux 2, -1 .. 1"]
22075    pub aux2: f32,
22076    #[doc = "Aux 3, -1 .. 1"]
22077    pub aux3: f32,
22078    #[doc = "Aux 4, -1 .. 1"]
22079    pub aux4: f32,
22080    #[doc = "System mode."]
22081    pub mode: MavMode,
22082    #[doc = "Navigation mode (MAV_NAV_MODE)"]
22083    pub nav_mode: u8,
22084}
22085impl HIL_CONTROLS_DATA {
22086    pub const ENCODED_LEN: usize = 42usize;
22087    pub const DEFAULT: Self = Self {
22088        time_usec: 0_u64,
22089        roll_ailerons: 0.0_f32,
22090        pitch_elevator: 0.0_f32,
22091        yaw_rudder: 0.0_f32,
22092        throttle: 0.0_f32,
22093        aux1: 0.0_f32,
22094        aux2: 0.0_f32,
22095        aux3: 0.0_f32,
22096        aux4: 0.0_f32,
22097        mode: MavMode::DEFAULT,
22098        nav_mode: 0_u8,
22099    };
22100    #[cfg(feature = "arbitrary")]
22101    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22102        use arbitrary::{Arbitrary, Unstructured};
22103        let mut buf = [0u8; 1024];
22104        rng.fill_bytes(&mut buf);
22105        let mut unstructured = Unstructured::new(&buf);
22106        Self::arbitrary(&mut unstructured).unwrap_or_default()
22107    }
22108}
22109impl Default for HIL_CONTROLS_DATA {
22110    fn default() -> Self {
22111        Self::DEFAULT.clone()
22112    }
22113}
22114impl MessageData for HIL_CONTROLS_DATA {
22115    type Message = MavMessage;
22116    const ID: u32 = 91u32;
22117    const NAME: &'static str = "HIL_CONTROLS";
22118    const EXTRA_CRC: u8 = 63u8;
22119    const ENCODED_LEN: usize = 42usize;
22120    fn deser(
22121        _version: MavlinkVersion,
22122        __input: &[u8],
22123    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22124        let avail_len = __input.len();
22125        let mut payload_buf = [0; Self::ENCODED_LEN];
22126        let mut buf = if avail_len < Self::ENCODED_LEN {
22127            payload_buf[0..avail_len].copy_from_slice(__input);
22128            Bytes::new(&payload_buf)
22129        } else {
22130            Bytes::new(__input)
22131        };
22132        let mut __struct = Self::default();
22133        __struct.time_usec = buf.get_u64_le();
22134        __struct.roll_ailerons = buf.get_f32_le();
22135        __struct.pitch_elevator = buf.get_f32_le();
22136        __struct.yaw_rudder = buf.get_f32_le();
22137        __struct.throttle = buf.get_f32_le();
22138        __struct.aux1 = buf.get_f32_le();
22139        __struct.aux2 = buf.get_f32_le();
22140        __struct.aux3 = buf.get_f32_le();
22141        __struct.aux4 = buf.get_f32_le();
22142        let tmp = buf.get_u8();
22143        __struct.mode =
22144            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22145                enum_type: "MavMode",
22146                value: tmp as u32,
22147            })?;
22148        __struct.nav_mode = buf.get_u8();
22149        Ok(__struct)
22150    }
22151    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22152        let mut __tmp = BytesMut::new(bytes);
22153        #[allow(clippy::absurd_extreme_comparisons)]
22154        #[allow(unused_comparisons)]
22155        if __tmp.remaining() < Self::ENCODED_LEN {
22156            panic!(
22157                "buffer is too small (need {} bytes, but got {})",
22158                Self::ENCODED_LEN,
22159                __tmp.remaining(),
22160            )
22161        }
22162        __tmp.put_u64_le(self.time_usec);
22163        __tmp.put_f32_le(self.roll_ailerons);
22164        __tmp.put_f32_le(self.pitch_elevator);
22165        __tmp.put_f32_le(self.yaw_rudder);
22166        __tmp.put_f32_le(self.throttle);
22167        __tmp.put_f32_le(self.aux1);
22168        __tmp.put_f32_le(self.aux2);
22169        __tmp.put_f32_le(self.aux3);
22170        __tmp.put_f32_le(self.aux4);
22171        __tmp.put_u8(self.mode as u8);
22172        __tmp.put_u8(self.nav_mode);
22173        if matches!(version, MavlinkVersion::V2) {
22174            let len = __tmp.len();
22175            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22176        } else {
22177            __tmp.len()
22178        }
22179    }
22180}
22181#[doc = "id: 401"]
22182#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
22183#[derive(Debug, Clone, PartialEq)]
22184#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22185#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22186pub struct SUPPORTED_TUNES_DATA {
22187    #[doc = "Bitfield of supported tune formats."]
22188    pub format: TuneFormat,
22189    #[doc = "System ID"]
22190    pub target_system: u8,
22191    #[doc = "Component ID"]
22192    pub target_component: u8,
22193}
22194impl SUPPORTED_TUNES_DATA {
22195    pub const ENCODED_LEN: usize = 6usize;
22196    pub const DEFAULT: Self = Self {
22197        format: TuneFormat::DEFAULT,
22198        target_system: 0_u8,
22199        target_component: 0_u8,
22200    };
22201    #[cfg(feature = "arbitrary")]
22202    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22203        use arbitrary::{Arbitrary, Unstructured};
22204        let mut buf = [0u8; 1024];
22205        rng.fill_bytes(&mut buf);
22206        let mut unstructured = Unstructured::new(&buf);
22207        Self::arbitrary(&mut unstructured).unwrap_or_default()
22208    }
22209}
22210impl Default for SUPPORTED_TUNES_DATA {
22211    fn default() -> Self {
22212        Self::DEFAULT.clone()
22213    }
22214}
22215impl MessageData for SUPPORTED_TUNES_DATA {
22216    type Message = MavMessage;
22217    const ID: u32 = 401u32;
22218    const NAME: &'static str = "SUPPORTED_TUNES";
22219    const EXTRA_CRC: u8 = 183u8;
22220    const ENCODED_LEN: usize = 6usize;
22221    fn deser(
22222        _version: MavlinkVersion,
22223        __input: &[u8],
22224    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22225        let avail_len = __input.len();
22226        let mut payload_buf = [0; Self::ENCODED_LEN];
22227        let mut buf = if avail_len < Self::ENCODED_LEN {
22228            payload_buf[0..avail_len].copy_from_slice(__input);
22229            Bytes::new(&payload_buf)
22230        } else {
22231            Bytes::new(__input)
22232        };
22233        let mut __struct = Self::default();
22234        let tmp = buf.get_u32_le();
22235        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
22236            ::mavlink_core::error::ParserError::InvalidEnum {
22237                enum_type: "TuneFormat",
22238                value: tmp as u32,
22239            },
22240        )?;
22241        __struct.target_system = buf.get_u8();
22242        __struct.target_component = buf.get_u8();
22243        Ok(__struct)
22244    }
22245    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22246        let mut __tmp = BytesMut::new(bytes);
22247        #[allow(clippy::absurd_extreme_comparisons)]
22248        #[allow(unused_comparisons)]
22249        if __tmp.remaining() < Self::ENCODED_LEN {
22250            panic!(
22251                "buffer is too small (need {} bytes, but got {})",
22252                Self::ENCODED_LEN,
22253                __tmp.remaining(),
22254            )
22255        }
22256        __tmp.put_u32_le(self.format as u32);
22257        __tmp.put_u8(self.target_system);
22258        __tmp.put_u8(self.target_component);
22259        if matches!(version, MavlinkVersion::V2) {
22260            let len = __tmp.len();
22261            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22262        } else {
22263            __tmp.len()
22264        }
22265    }
22266}
22267#[doc = "id: 276"]
22268#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
22269#[derive(Debug, Clone, PartialEq)]
22270#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22271#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22272pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
22273    #[doc = "Latitude of tracked object"]
22274    pub lat: i32,
22275    #[doc = "Longitude of tracked object"]
22276    pub lon: i32,
22277    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
22278    pub alt: f32,
22279    #[doc = "Horizontal accuracy. NAN if unknown"]
22280    pub h_acc: f32,
22281    #[doc = "Vertical accuracy. NAN if unknown"]
22282    pub v_acc: f32,
22283    #[doc = "North velocity of tracked object. NAN if unknown"]
22284    pub vel_n: f32,
22285    #[doc = "East velocity of tracked object. NAN if unknown"]
22286    pub vel_e: f32,
22287    #[doc = "Down velocity of tracked object. NAN if unknown"]
22288    pub vel_d: f32,
22289    #[doc = "Velocity accuracy. NAN if unknown"]
22290    pub vel_acc: f32,
22291    #[doc = "Distance between camera and tracked object. NAN if unknown"]
22292    pub dist: f32,
22293    #[doc = "Heading in radians, in NED. NAN if unknown"]
22294    pub hdg: f32,
22295    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
22296    pub hdg_acc: f32,
22297    #[doc = "Current tracking status"]
22298    pub tracking_status: CameraTrackingStatusFlags,
22299    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
22300    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22301    pub camera_device_id: u8,
22302}
22303impl CAMERA_TRACKING_GEO_STATUS_DATA {
22304    pub const ENCODED_LEN: usize = 50usize;
22305    pub const DEFAULT: Self = Self {
22306        lat: 0_i32,
22307        lon: 0_i32,
22308        alt: 0.0_f32,
22309        h_acc: 0.0_f32,
22310        v_acc: 0.0_f32,
22311        vel_n: 0.0_f32,
22312        vel_e: 0.0_f32,
22313        vel_d: 0.0_f32,
22314        vel_acc: 0.0_f32,
22315        dist: 0.0_f32,
22316        hdg: 0.0_f32,
22317        hdg_acc: 0.0_f32,
22318        tracking_status: CameraTrackingStatusFlags::DEFAULT,
22319        camera_device_id: 0_u8,
22320    };
22321    #[cfg(feature = "arbitrary")]
22322    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22323        use arbitrary::{Arbitrary, Unstructured};
22324        let mut buf = [0u8; 1024];
22325        rng.fill_bytes(&mut buf);
22326        let mut unstructured = Unstructured::new(&buf);
22327        Self::arbitrary(&mut unstructured).unwrap_or_default()
22328    }
22329}
22330impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
22331    fn default() -> Self {
22332        Self::DEFAULT.clone()
22333    }
22334}
22335impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
22336    type Message = MavMessage;
22337    const ID: u32 = 276u32;
22338    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
22339    const EXTRA_CRC: u8 = 18u8;
22340    const ENCODED_LEN: usize = 50usize;
22341    fn deser(
22342        _version: MavlinkVersion,
22343        __input: &[u8],
22344    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22345        let avail_len = __input.len();
22346        let mut payload_buf = [0; Self::ENCODED_LEN];
22347        let mut buf = if avail_len < Self::ENCODED_LEN {
22348            payload_buf[0..avail_len].copy_from_slice(__input);
22349            Bytes::new(&payload_buf)
22350        } else {
22351            Bytes::new(__input)
22352        };
22353        let mut __struct = Self::default();
22354        __struct.lat = buf.get_i32_le();
22355        __struct.lon = buf.get_i32_le();
22356        __struct.alt = buf.get_f32_le();
22357        __struct.h_acc = buf.get_f32_le();
22358        __struct.v_acc = buf.get_f32_le();
22359        __struct.vel_n = buf.get_f32_le();
22360        __struct.vel_e = buf.get_f32_le();
22361        __struct.vel_d = buf.get_f32_le();
22362        __struct.vel_acc = buf.get_f32_le();
22363        __struct.dist = buf.get_f32_le();
22364        __struct.hdg = buf.get_f32_le();
22365        __struct.hdg_acc = buf.get_f32_le();
22366        let tmp = buf.get_u8();
22367        __struct.tracking_status =
22368            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22369                enum_type: "CameraTrackingStatusFlags",
22370                value: tmp as u32,
22371            })?;
22372        __struct.camera_device_id = buf.get_u8();
22373        Ok(__struct)
22374    }
22375    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22376        let mut __tmp = BytesMut::new(bytes);
22377        #[allow(clippy::absurd_extreme_comparisons)]
22378        #[allow(unused_comparisons)]
22379        if __tmp.remaining() < Self::ENCODED_LEN {
22380            panic!(
22381                "buffer is too small (need {} bytes, but got {})",
22382                Self::ENCODED_LEN,
22383                __tmp.remaining(),
22384            )
22385        }
22386        __tmp.put_i32_le(self.lat);
22387        __tmp.put_i32_le(self.lon);
22388        __tmp.put_f32_le(self.alt);
22389        __tmp.put_f32_le(self.h_acc);
22390        __tmp.put_f32_le(self.v_acc);
22391        __tmp.put_f32_le(self.vel_n);
22392        __tmp.put_f32_le(self.vel_e);
22393        __tmp.put_f32_le(self.vel_d);
22394        __tmp.put_f32_le(self.vel_acc);
22395        __tmp.put_f32_le(self.dist);
22396        __tmp.put_f32_le(self.hdg);
22397        __tmp.put_f32_le(self.hdg_acc);
22398        __tmp.put_u8(self.tracking_status as u8);
22399        __tmp.put_u8(self.camera_device_id);
22400        if matches!(version, MavlinkVersion::V2) {
22401            let len = __tmp.len();
22402            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22403        } else {
22404            __tmp.len()
22405        }
22406    }
22407}
22408#[doc = "id: 375"]
22409#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
22410#[derive(Debug, Clone, PartialEq)]
22411#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22412#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22413pub struct ACTUATOR_OUTPUT_STATUS_DATA {
22414    #[doc = "Timestamp (since system boot)."]
22415    pub time_usec: u64,
22416    #[doc = "Active outputs"]
22417    pub active: u32,
22418    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
22419    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22420    pub actuator: [f32; 32],
22421}
22422impl ACTUATOR_OUTPUT_STATUS_DATA {
22423    pub const ENCODED_LEN: usize = 140usize;
22424    pub const DEFAULT: Self = Self {
22425        time_usec: 0_u64,
22426        active: 0_u32,
22427        actuator: [0.0_f32; 32usize],
22428    };
22429    #[cfg(feature = "arbitrary")]
22430    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22431        use arbitrary::{Arbitrary, Unstructured};
22432        let mut buf = [0u8; 1024];
22433        rng.fill_bytes(&mut buf);
22434        let mut unstructured = Unstructured::new(&buf);
22435        Self::arbitrary(&mut unstructured).unwrap_or_default()
22436    }
22437}
22438impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
22439    fn default() -> Self {
22440        Self::DEFAULT.clone()
22441    }
22442}
22443impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
22444    type Message = MavMessage;
22445    const ID: u32 = 375u32;
22446    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
22447    const EXTRA_CRC: u8 = 251u8;
22448    const ENCODED_LEN: usize = 140usize;
22449    fn deser(
22450        _version: MavlinkVersion,
22451        __input: &[u8],
22452    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22453        let avail_len = __input.len();
22454        let mut payload_buf = [0; Self::ENCODED_LEN];
22455        let mut buf = if avail_len < Self::ENCODED_LEN {
22456            payload_buf[0..avail_len].copy_from_slice(__input);
22457            Bytes::new(&payload_buf)
22458        } else {
22459            Bytes::new(__input)
22460        };
22461        let mut __struct = Self::default();
22462        __struct.time_usec = buf.get_u64_le();
22463        __struct.active = buf.get_u32_le();
22464        for v in &mut __struct.actuator {
22465            let val = buf.get_f32_le();
22466            *v = val;
22467        }
22468        Ok(__struct)
22469    }
22470    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22471        let mut __tmp = BytesMut::new(bytes);
22472        #[allow(clippy::absurd_extreme_comparisons)]
22473        #[allow(unused_comparisons)]
22474        if __tmp.remaining() < Self::ENCODED_LEN {
22475            panic!(
22476                "buffer is too small (need {} bytes, but got {})",
22477                Self::ENCODED_LEN,
22478                __tmp.remaining(),
22479            )
22480        }
22481        __tmp.put_u64_le(self.time_usec);
22482        __tmp.put_u32_le(self.active);
22483        for val in &self.actuator {
22484            __tmp.put_f32_le(*val);
22485        }
22486        if matches!(version, MavlinkVersion::V2) {
22487            let len = __tmp.len();
22488            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22489        } else {
22490            __tmp.len()
22491        }
22492    }
22493}
22494#[doc = "id: 287"]
22495#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
22496#[derive(Debug, Clone, PartialEq)]
22497#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22498#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22499pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
22500    #[doc = "High level gimbal manager flags to use."]
22501    pub flags: GimbalManagerFlags,
22502    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
22503    pub pitch: f32,
22504    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
22505    pub yaw: f32,
22506    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
22507    pub pitch_rate: f32,
22508    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
22509    pub yaw_rate: f32,
22510    #[doc = "System ID"]
22511    pub target_system: u8,
22512    #[doc = "Component ID"]
22513    pub target_component: u8,
22514    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
22515    pub gimbal_device_id: u8,
22516}
22517impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
22518    pub const ENCODED_LEN: usize = 23usize;
22519    pub const DEFAULT: Self = Self {
22520        flags: GimbalManagerFlags::DEFAULT,
22521        pitch: 0.0_f32,
22522        yaw: 0.0_f32,
22523        pitch_rate: 0.0_f32,
22524        yaw_rate: 0.0_f32,
22525        target_system: 0_u8,
22526        target_component: 0_u8,
22527        gimbal_device_id: 0_u8,
22528    };
22529    #[cfg(feature = "arbitrary")]
22530    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22531        use arbitrary::{Arbitrary, Unstructured};
22532        let mut buf = [0u8; 1024];
22533        rng.fill_bytes(&mut buf);
22534        let mut unstructured = Unstructured::new(&buf);
22535        Self::arbitrary(&mut unstructured).unwrap_or_default()
22536    }
22537}
22538impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
22539    fn default() -> Self {
22540        Self::DEFAULT.clone()
22541    }
22542}
22543impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
22544    type Message = MavMessage;
22545    const ID: u32 = 287u32;
22546    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
22547    const EXTRA_CRC: u8 = 1u8;
22548    const ENCODED_LEN: usize = 23usize;
22549    fn deser(
22550        _version: MavlinkVersion,
22551        __input: &[u8],
22552    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22553        let avail_len = __input.len();
22554        let mut payload_buf = [0; Self::ENCODED_LEN];
22555        let mut buf = if avail_len < Self::ENCODED_LEN {
22556            payload_buf[0..avail_len].copy_from_slice(__input);
22557            Bytes::new(&payload_buf)
22558        } else {
22559            Bytes::new(__input)
22560        };
22561        let mut __struct = Self::default();
22562        let tmp = buf.get_u32_le();
22563        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
22564            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
22565                flag_type: "GimbalManagerFlags",
22566                value: tmp as u32,
22567            })?;
22568        __struct.pitch = buf.get_f32_le();
22569        __struct.yaw = buf.get_f32_le();
22570        __struct.pitch_rate = buf.get_f32_le();
22571        __struct.yaw_rate = buf.get_f32_le();
22572        __struct.target_system = buf.get_u8();
22573        __struct.target_component = buf.get_u8();
22574        __struct.gimbal_device_id = buf.get_u8();
22575        Ok(__struct)
22576    }
22577    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22578        let mut __tmp = BytesMut::new(bytes);
22579        #[allow(clippy::absurd_extreme_comparisons)]
22580        #[allow(unused_comparisons)]
22581        if __tmp.remaining() < Self::ENCODED_LEN {
22582            panic!(
22583                "buffer is too small (need {} bytes, but got {})",
22584                Self::ENCODED_LEN,
22585                __tmp.remaining(),
22586            )
22587        }
22588        __tmp.put_u32_le(self.flags.bits());
22589        __tmp.put_f32_le(self.pitch);
22590        __tmp.put_f32_le(self.yaw);
22591        __tmp.put_f32_le(self.pitch_rate);
22592        __tmp.put_f32_le(self.yaw_rate);
22593        __tmp.put_u8(self.target_system);
22594        __tmp.put_u8(self.target_component);
22595        __tmp.put_u8(self.gimbal_device_id);
22596        if matches!(version, MavlinkVersion::V2) {
22597            let len = __tmp.len();
22598            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22599        } else {
22600            __tmp.len()
22601        }
22602    }
22603}
22604#[doc = "id: 138"]
22605#[doc = "Motion capture attitude and position."]
22606#[derive(Debug, Clone, PartialEq)]
22607#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22608#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22609pub struct ATT_POS_MOCAP_DATA {
22610    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22611    pub time_usec: u64,
22612    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
22613    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22614    pub q: [f32; 4],
22615    #[doc = "X position (NED)"]
22616    pub x: f32,
22617    #[doc = "Y position (NED)"]
22618    pub y: f32,
22619    #[doc = "Z position (NED)"]
22620    pub z: f32,
22621    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
22622    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22623    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22624    pub covariance: [f32; 21],
22625}
22626impl ATT_POS_MOCAP_DATA {
22627    pub const ENCODED_LEN: usize = 120usize;
22628    pub const DEFAULT: Self = Self {
22629        time_usec: 0_u64,
22630        q: [0.0_f32; 4usize],
22631        x: 0.0_f32,
22632        y: 0.0_f32,
22633        z: 0.0_f32,
22634        covariance: [0.0_f32; 21usize],
22635    };
22636    #[cfg(feature = "arbitrary")]
22637    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22638        use arbitrary::{Arbitrary, Unstructured};
22639        let mut buf = [0u8; 1024];
22640        rng.fill_bytes(&mut buf);
22641        let mut unstructured = Unstructured::new(&buf);
22642        Self::arbitrary(&mut unstructured).unwrap_or_default()
22643    }
22644}
22645impl Default for ATT_POS_MOCAP_DATA {
22646    fn default() -> Self {
22647        Self::DEFAULT.clone()
22648    }
22649}
22650impl MessageData for ATT_POS_MOCAP_DATA {
22651    type Message = MavMessage;
22652    const ID: u32 = 138u32;
22653    const NAME: &'static str = "ATT_POS_MOCAP";
22654    const EXTRA_CRC: u8 = 109u8;
22655    const ENCODED_LEN: usize = 120usize;
22656    fn deser(
22657        _version: MavlinkVersion,
22658        __input: &[u8],
22659    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22660        let avail_len = __input.len();
22661        let mut payload_buf = [0; Self::ENCODED_LEN];
22662        let mut buf = if avail_len < Self::ENCODED_LEN {
22663            payload_buf[0..avail_len].copy_from_slice(__input);
22664            Bytes::new(&payload_buf)
22665        } else {
22666            Bytes::new(__input)
22667        };
22668        let mut __struct = Self::default();
22669        __struct.time_usec = buf.get_u64_le();
22670        for v in &mut __struct.q {
22671            let val = buf.get_f32_le();
22672            *v = val;
22673        }
22674        __struct.x = buf.get_f32_le();
22675        __struct.y = buf.get_f32_le();
22676        __struct.z = buf.get_f32_le();
22677        for v in &mut __struct.covariance {
22678            let val = buf.get_f32_le();
22679            *v = val;
22680        }
22681        Ok(__struct)
22682    }
22683    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22684        let mut __tmp = BytesMut::new(bytes);
22685        #[allow(clippy::absurd_extreme_comparisons)]
22686        #[allow(unused_comparisons)]
22687        if __tmp.remaining() < Self::ENCODED_LEN {
22688            panic!(
22689                "buffer is too small (need {} bytes, but got {})",
22690                Self::ENCODED_LEN,
22691                __tmp.remaining(),
22692            )
22693        }
22694        __tmp.put_u64_le(self.time_usec);
22695        for val in &self.q {
22696            __tmp.put_f32_le(*val);
22697        }
22698        __tmp.put_f32_le(self.x);
22699        __tmp.put_f32_le(self.y);
22700        __tmp.put_f32_le(self.z);
22701        for val in &self.covariance {
22702            __tmp.put_f32_le(*val);
22703        }
22704        if matches!(version, MavlinkVersion::V2) {
22705            let len = __tmp.len();
22706            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22707        } else {
22708            __tmp.len()
22709        }
22710    }
22711}
22712#[doc = "id: 0"]
22713#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
22714#[derive(Debug, Clone, PartialEq)]
22715#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22716#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22717pub struct HEARTBEAT_DATA {
22718    #[doc = "A bitfield for use for autopilot-specific flags"]
22719    pub custom_mode: u32,
22720    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
22721    pub mavtype: MavType,
22722    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
22723    pub autopilot: MavAutopilot,
22724    #[doc = "System mode bitmap."]
22725    pub base_mode: MavModeFlag,
22726    #[doc = "System status flag."]
22727    pub system_status: MavState,
22728    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
22729    pub mavlink_version: u8,
22730}
22731impl HEARTBEAT_DATA {
22732    pub const ENCODED_LEN: usize = 9usize;
22733    pub const DEFAULT: Self = Self {
22734        custom_mode: 0_u32,
22735        mavtype: MavType::DEFAULT,
22736        autopilot: MavAutopilot::DEFAULT,
22737        base_mode: MavModeFlag::DEFAULT,
22738        system_status: MavState::DEFAULT,
22739        mavlink_version: 0_u8,
22740    };
22741    #[cfg(feature = "arbitrary")]
22742    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22743        use arbitrary::{Arbitrary, Unstructured};
22744        let mut buf = [0u8; 1024];
22745        rng.fill_bytes(&mut buf);
22746        let mut unstructured = Unstructured::new(&buf);
22747        Self::arbitrary(&mut unstructured).unwrap_or_default()
22748    }
22749}
22750impl Default for HEARTBEAT_DATA {
22751    fn default() -> Self {
22752        Self::DEFAULT.clone()
22753    }
22754}
22755impl MessageData for HEARTBEAT_DATA {
22756    type Message = MavMessage;
22757    const ID: u32 = 0u32;
22758    const NAME: &'static str = "HEARTBEAT";
22759    const EXTRA_CRC: u8 = 50u8;
22760    const ENCODED_LEN: usize = 9usize;
22761    fn deser(
22762        _version: MavlinkVersion,
22763        __input: &[u8],
22764    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22765        let avail_len = __input.len();
22766        let mut payload_buf = [0; Self::ENCODED_LEN];
22767        let mut buf = if avail_len < Self::ENCODED_LEN {
22768            payload_buf[0..avail_len].copy_from_slice(__input);
22769            Bytes::new(&payload_buf)
22770        } else {
22771            Bytes::new(__input)
22772        };
22773        let mut __struct = Self::default();
22774        __struct.custom_mode = buf.get_u32_le();
22775        let tmp = buf.get_u8();
22776        __struct.mavtype =
22777            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22778                enum_type: "MavType",
22779                value: tmp as u32,
22780            })?;
22781        let tmp = buf.get_u8();
22782        __struct.autopilot =
22783            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22784                enum_type: "MavAutopilot",
22785                value: tmp as u32,
22786            })?;
22787        let tmp = buf.get_u8();
22788        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
22789            ::mavlink_core::error::ParserError::InvalidFlag {
22790                flag_type: "MavModeFlag",
22791                value: tmp as u32,
22792            },
22793        )?;
22794        let tmp = buf.get_u8();
22795        __struct.system_status =
22796            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22797                enum_type: "MavState",
22798                value: tmp as u32,
22799            })?;
22800        __struct.mavlink_version = buf.get_u8();
22801        Ok(__struct)
22802    }
22803    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22804        let mut __tmp = BytesMut::new(bytes);
22805        #[allow(clippy::absurd_extreme_comparisons)]
22806        #[allow(unused_comparisons)]
22807        if __tmp.remaining() < Self::ENCODED_LEN {
22808            panic!(
22809                "buffer is too small (need {} bytes, but got {})",
22810                Self::ENCODED_LEN,
22811                __tmp.remaining(),
22812            )
22813        }
22814        __tmp.put_u32_le(self.custom_mode);
22815        __tmp.put_u8(self.mavtype as u8);
22816        __tmp.put_u8(self.autopilot as u8);
22817        __tmp.put_u8(self.base_mode.bits());
22818        __tmp.put_u8(self.system_status as u8);
22819        __tmp.put_u8(self.mavlink_version);
22820        if matches!(version, MavlinkVersion::V2) {
22821            let len = __tmp.len();
22822            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22823        } else {
22824            __tmp.len()
22825        }
22826    }
22827}
22828#[doc = "id: 110"]
22829#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
22830#[derive(Debug, Clone, PartialEq)]
22831#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22832#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22833pub struct FILE_TRANSFER_PROTOCOL_DATA {
22834    #[doc = "Network ID (0 for broadcast)"]
22835    pub target_network: u8,
22836    #[doc = "System ID (0 for broadcast)"]
22837    pub target_system: u8,
22838    #[doc = "Component ID (0 for broadcast)"]
22839    pub target_component: u8,
22840    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
22841    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22842    pub payload: [u8; 251],
22843}
22844impl FILE_TRANSFER_PROTOCOL_DATA {
22845    pub const ENCODED_LEN: usize = 254usize;
22846    pub const DEFAULT: Self = Self {
22847        target_network: 0_u8,
22848        target_system: 0_u8,
22849        target_component: 0_u8,
22850        payload: [0_u8; 251usize],
22851    };
22852    #[cfg(feature = "arbitrary")]
22853    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22854        use arbitrary::{Arbitrary, Unstructured};
22855        let mut buf = [0u8; 1024];
22856        rng.fill_bytes(&mut buf);
22857        let mut unstructured = Unstructured::new(&buf);
22858        Self::arbitrary(&mut unstructured).unwrap_or_default()
22859    }
22860}
22861impl Default for FILE_TRANSFER_PROTOCOL_DATA {
22862    fn default() -> Self {
22863        Self::DEFAULT.clone()
22864    }
22865}
22866impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
22867    type Message = MavMessage;
22868    const ID: u32 = 110u32;
22869    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
22870    const EXTRA_CRC: u8 = 84u8;
22871    const ENCODED_LEN: usize = 254usize;
22872    fn deser(
22873        _version: MavlinkVersion,
22874        __input: &[u8],
22875    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22876        let avail_len = __input.len();
22877        let mut payload_buf = [0; Self::ENCODED_LEN];
22878        let mut buf = if avail_len < Self::ENCODED_LEN {
22879            payload_buf[0..avail_len].copy_from_slice(__input);
22880            Bytes::new(&payload_buf)
22881        } else {
22882            Bytes::new(__input)
22883        };
22884        let mut __struct = Self::default();
22885        __struct.target_network = buf.get_u8();
22886        __struct.target_system = buf.get_u8();
22887        __struct.target_component = buf.get_u8();
22888        for v in &mut __struct.payload {
22889            let val = buf.get_u8();
22890            *v = val;
22891        }
22892        Ok(__struct)
22893    }
22894    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22895        let mut __tmp = BytesMut::new(bytes);
22896        #[allow(clippy::absurd_extreme_comparisons)]
22897        #[allow(unused_comparisons)]
22898        if __tmp.remaining() < Self::ENCODED_LEN {
22899            panic!(
22900                "buffer is too small (need {} bytes, but got {})",
22901                Self::ENCODED_LEN,
22902                __tmp.remaining(),
22903            )
22904        }
22905        __tmp.put_u8(self.target_network);
22906        __tmp.put_u8(self.target_system);
22907        __tmp.put_u8(self.target_component);
22908        for val in &self.payload {
22909            __tmp.put_u8(*val);
22910        }
22911        if matches!(version, MavlinkVersion::V2) {
22912            let len = __tmp.len();
22913            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22914        } else {
22915            __tmp.len()
22916        }
22917    }
22918}
22919#[doc = "id: 41"]
22920#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
22921#[derive(Debug, Clone, PartialEq)]
22922#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22923#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22924pub struct MISSION_SET_CURRENT_DATA {
22925    #[doc = "Sequence"]
22926    pub seq: u16,
22927    #[doc = "System ID"]
22928    pub target_system: u8,
22929    #[doc = "Component ID"]
22930    pub target_component: u8,
22931}
22932impl MISSION_SET_CURRENT_DATA {
22933    pub const ENCODED_LEN: usize = 4usize;
22934    pub const DEFAULT: Self = Self {
22935        seq: 0_u16,
22936        target_system: 0_u8,
22937        target_component: 0_u8,
22938    };
22939    #[cfg(feature = "arbitrary")]
22940    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22941        use arbitrary::{Arbitrary, Unstructured};
22942        let mut buf = [0u8; 1024];
22943        rng.fill_bytes(&mut buf);
22944        let mut unstructured = Unstructured::new(&buf);
22945        Self::arbitrary(&mut unstructured).unwrap_or_default()
22946    }
22947}
22948impl Default for MISSION_SET_CURRENT_DATA {
22949    fn default() -> Self {
22950        Self::DEFAULT.clone()
22951    }
22952}
22953impl MessageData for MISSION_SET_CURRENT_DATA {
22954    type Message = MavMessage;
22955    const ID: u32 = 41u32;
22956    const NAME: &'static str = "MISSION_SET_CURRENT";
22957    const EXTRA_CRC: u8 = 28u8;
22958    const ENCODED_LEN: usize = 4usize;
22959    fn deser(
22960        _version: MavlinkVersion,
22961        __input: &[u8],
22962    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22963        let avail_len = __input.len();
22964        let mut payload_buf = [0; Self::ENCODED_LEN];
22965        let mut buf = if avail_len < Self::ENCODED_LEN {
22966            payload_buf[0..avail_len].copy_from_slice(__input);
22967            Bytes::new(&payload_buf)
22968        } else {
22969            Bytes::new(__input)
22970        };
22971        let mut __struct = Self::default();
22972        __struct.seq = buf.get_u16_le();
22973        __struct.target_system = buf.get_u8();
22974        __struct.target_component = buf.get_u8();
22975        Ok(__struct)
22976    }
22977    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22978        let mut __tmp = BytesMut::new(bytes);
22979        #[allow(clippy::absurd_extreme_comparisons)]
22980        #[allow(unused_comparisons)]
22981        if __tmp.remaining() < Self::ENCODED_LEN {
22982            panic!(
22983                "buffer is too small (need {} bytes, but got {})",
22984                Self::ENCODED_LEN,
22985                __tmp.remaining(),
22986            )
22987        }
22988        __tmp.put_u16_le(self.seq);
22989        __tmp.put_u8(self.target_system);
22990        __tmp.put_u8(self.target_component);
22991        if matches!(version, MavlinkVersion::V2) {
22992            let len = __tmp.len();
22993            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22994        } else {
22995            __tmp.len()
22996        }
22997    }
22998}
22999#[doc = "id: 275"]
23000#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
23001#[derive(Debug, Clone, PartialEq)]
23002#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23003#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23004pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
23005    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
23006    pub point_x: f32,
23007    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
23008    pub point_y: f32,
23009    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
23010    pub radius: f32,
23011    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
23012    pub rec_top_x: f32,
23013    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
23014    pub rec_top_y: f32,
23015    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
23016    pub rec_bottom_x: f32,
23017    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
23018    pub rec_bottom_y: f32,
23019    #[doc = "Current tracking status"]
23020    pub tracking_status: CameraTrackingStatusFlags,
23021    #[doc = "Current tracking mode"]
23022    pub tracking_mode: CameraTrackingMode,
23023    #[doc = "Defines location of target data"]
23024    pub target_data: CameraTrackingTargetData,
23025    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
23026    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23027    pub camera_device_id: u8,
23028}
23029impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
23030    pub const ENCODED_LEN: usize = 32usize;
23031    pub const DEFAULT: Self = Self {
23032        point_x: 0.0_f32,
23033        point_y: 0.0_f32,
23034        radius: 0.0_f32,
23035        rec_top_x: 0.0_f32,
23036        rec_top_y: 0.0_f32,
23037        rec_bottom_x: 0.0_f32,
23038        rec_bottom_y: 0.0_f32,
23039        tracking_status: CameraTrackingStatusFlags::DEFAULT,
23040        tracking_mode: CameraTrackingMode::DEFAULT,
23041        target_data: CameraTrackingTargetData::DEFAULT,
23042        camera_device_id: 0_u8,
23043    };
23044    #[cfg(feature = "arbitrary")]
23045    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23046        use arbitrary::{Arbitrary, Unstructured};
23047        let mut buf = [0u8; 1024];
23048        rng.fill_bytes(&mut buf);
23049        let mut unstructured = Unstructured::new(&buf);
23050        Self::arbitrary(&mut unstructured).unwrap_or_default()
23051    }
23052}
23053impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
23054    fn default() -> Self {
23055        Self::DEFAULT.clone()
23056    }
23057}
23058impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
23059    type Message = MavMessage;
23060    const ID: u32 = 275u32;
23061    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
23062    const EXTRA_CRC: u8 = 126u8;
23063    const ENCODED_LEN: usize = 32usize;
23064    fn deser(
23065        _version: MavlinkVersion,
23066        __input: &[u8],
23067    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23068        let avail_len = __input.len();
23069        let mut payload_buf = [0; Self::ENCODED_LEN];
23070        let mut buf = if avail_len < Self::ENCODED_LEN {
23071            payload_buf[0..avail_len].copy_from_slice(__input);
23072            Bytes::new(&payload_buf)
23073        } else {
23074            Bytes::new(__input)
23075        };
23076        let mut __struct = Self::default();
23077        __struct.point_x = buf.get_f32_le();
23078        __struct.point_y = buf.get_f32_le();
23079        __struct.radius = buf.get_f32_le();
23080        __struct.rec_top_x = buf.get_f32_le();
23081        __struct.rec_top_y = buf.get_f32_le();
23082        __struct.rec_bottom_x = buf.get_f32_le();
23083        __struct.rec_bottom_y = buf.get_f32_le();
23084        let tmp = buf.get_u8();
23085        __struct.tracking_status =
23086            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23087                enum_type: "CameraTrackingStatusFlags",
23088                value: tmp as u32,
23089            })?;
23090        let tmp = buf.get_u8();
23091        __struct.tracking_mode =
23092            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23093                enum_type: "CameraTrackingMode",
23094                value: tmp as u32,
23095            })?;
23096        let tmp = buf.get_u8();
23097        __struct.target_data =
23098            CameraTrackingTargetData::from_bits(tmp & CameraTrackingTargetData::all().bits())
23099                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
23100                    flag_type: "CameraTrackingTargetData",
23101                    value: tmp as u32,
23102                })?;
23103        __struct.camera_device_id = buf.get_u8();
23104        Ok(__struct)
23105    }
23106    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23107        let mut __tmp = BytesMut::new(bytes);
23108        #[allow(clippy::absurd_extreme_comparisons)]
23109        #[allow(unused_comparisons)]
23110        if __tmp.remaining() < Self::ENCODED_LEN {
23111            panic!(
23112                "buffer is too small (need {} bytes, but got {})",
23113                Self::ENCODED_LEN,
23114                __tmp.remaining(),
23115            )
23116        }
23117        __tmp.put_f32_le(self.point_x);
23118        __tmp.put_f32_le(self.point_y);
23119        __tmp.put_f32_le(self.radius);
23120        __tmp.put_f32_le(self.rec_top_x);
23121        __tmp.put_f32_le(self.rec_top_y);
23122        __tmp.put_f32_le(self.rec_bottom_x);
23123        __tmp.put_f32_le(self.rec_bottom_y);
23124        __tmp.put_u8(self.tracking_status as u8);
23125        __tmp.put_u8(self.tracking_mode as u8);
23126        __tmp.put_u8(self.target_data.bits());
23127        __tmp.put_u8(self.camera_device_id);
23128        if matches!(version, MavlinkVersion::V2) {
23129            let len = __tmp.len();
23130            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23131        } else {
23132            __tmp.len()
23133        }
23134    }
23135}
23136#[doc = "id: 29"]
23137#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
23138#[derive(Debug, Clone, PartialEq)]
23139#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23140#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23141pub struct SCALED_PRESSURE_DATA {
23142    #[doc = "Timestamp (time since system boot)."]
23143    pub time_boot_ms: u32,
23144    #[doc = "Absolute pressure"]
23145    pub press_abs: f32,
23146    #[doc = "Differential pressure 1"]
23147    pub press_diff: f32,
23148    #[doc = "Absolute pressure temperature"]
23149    pub temperature: i16,
23150    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
23151    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23152    pub temperature_press_diff: i16,
23153}
23154impl SCALED_PRESSURE_DATA {
23155    pub const ENCODED_LEN: usize = 16usize;
23156    pub const DEFAULT: Self = Self {
23157        time_boot_ms: 0_u32,
23158        press_abs: 0.0_f32,
23159        press_diff: 0.0_f32,
23160        temperature: 0_i16,
23161        temperature_press_diff: 0_i16,
23162    };
23163    #[cfg(feature = "arbitrary")]
23164    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23165        use arbitrary::{Arbitrary, Unstructured};
23166        let mut buf = [0u8; 1024];
23167        rng.fill_bytes(&mut buf);
23168        let mut unstructured = Unstructured::new(&buf);
23169        Self::arbitrary(&mut unstructured).unwrap_or_default()
23170    }
23171}
23172impl Default for SCALED_PRESSURE_DATA {
23173    fn default() -> Self {
23174        Self::DEFAULT.clone()
23175    }
23176}
23177impl MessageData for SCALED_PRESSURE_DATA {
23178    type Message = MavMessage;
23179    const ID: u32 = 29u32;
23180    const NAME: &'static str = "SCALED_PRESSURE";
23181    const EXTRA_CRC: u8 = 115u8;
23182    const ENCODED_LEN: usize = 16usize;
23183    fn deser(
23184        _version: MavlinkVersion,
23185        __input: &[u8],
23186    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23187        let avail_len = __input.len();
23188        let mut payload_buf = [0; Self::ENCODED_LEN];
23189        let mut buf = if avail_len < Self::ENCODED_LEN {
23190            payload_buf[0..avail_len].copy_from_slice(__input);
23191            Bytes::new(&payload_buf)
23192        } else {
23193            Bytes::new(__input)
23194        };
23195        let mut __struct = Self::default();
23196        __struct.time_boot_ms = buf.get_u32_le();
23197        __struct.press_abs = buf.get_f32_le();
23198        __struct.press_diff = buf.get_f32_le();
23199        __struct.temperature = buf.get_i16_le();
23200        __struct.temperature_press_diff = buf.get_i16_le();
23201        Ok(__struct)
23202    }
23203    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23204        let mut __tmp = BytesMut::new(bytes);
23205        #[allow(clippy::absurd_extreme_comparisons)]
23206        #[allow(unused_comparisons)]
23207        if __tmp.remaining() < Self::ENCODED_LEN {
23208            panic!(
23209                "buffer is too small (need {} bytes, but got {})",
23210                Self::ENCODED_LEN,
23211                __tmp.remaining(),
23212            )
23213        }
23214        __tmp.put_u32_le(self.time_boot_ms);
23215        __tmp.put_f32_le(self.press_abs);
23216        __tmp.put_f32_le(self.press_diff);
23217        __tmp.put_i16_le(self.temperature);
23218        __tmp.put_i16_le(self.temperature_press_diff);
23219        if matches!(version, MavlinkVersion::V2) {
23220            let len = __tmp.len();
23221            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23222        } else {
23223            __tmp.len()
23224        }
23225    }
23226}
23227#[doc = "id: 101"]
23228#[doc = "Global position/attitude estimate from a vision source."]
23229#[derive(Debug, Clone, PartialEq)]
23230#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23231#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23232pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
23233    #[doc = "Timestamp (UNIX time or since system boot)"]
23234    pub usec: u64,
23235    #[doc = "Global X position"]
23236    pub x: f32,
23237    #[doc = "Global Y position"]
23238    pub y: f32,
23239    #[doc = "Global Z position"]
23240    pub z: f32,
23241    #[doc = "Roll angle"]
23242    pub roll: f32,
23243    #[doc = "Pitch angle"]
23244    pub pitch: f32,
23245    #[doc = "Yaw angle"]
23246    pub yaw: f32,
23247    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
23248    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23249    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23250    pub covariance: [f32; 21],
23251    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
23252    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23253    pub reset_counter: u8,
23254}
23255impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
23256    pub const ENCODED_LEN: usize = 117usize;
23257    pub const DEFAULT: Self = Self {
23258        usec: 0_u64,
23259        x: 0.0_f32,
23260        y: 0.0_f32,
23261        z: 0.0_f32,
23262        roll: 0.0_f32,
23263        pitch: 0.0_f32,
23264        yaw: 0.0_f32,
23265        covariance: [0.0_f32; 21usize],
23266        reset_counter: 0_u8,
23267    };
23268    #[cfg(feature = "arbitrary")]
23269    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23270        use arbitrary::{Arbitrary, Unstructured};
23271        let mut buf = [0u8; 1024];
23272        rng.fill_bytes(&mut buf);
23273        let mut unstructured = Unstructured::new(&buf);
23274        Self::arbitrary(&mut unstructured).unwrap_or_default()
23275    }
23276}
23277impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
23278    fn default() -> Self {
23279        Self::DEFAULT.clone()
23280    }
23281}
23282impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
23283    type Message = MavMessage;
23284    const ID: u32 = 101u32;
23285    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
23286    const EXTRA_CRC: u8 = 102u8;
23287    const ENCODED_LEN: usize = 117usize;
23288    fn deser(
23289        _version: MavlinkVersion,
23290        __input: &[u8],
23291    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23292        let avail_len = __input.len();
23293        let mut payload_buf = [0; Self::ENCODED_LEN];
23294        let mut buf = if avail_len < Self::ENCODED_LEN {
23295            payload_buf[0..avail_len].copy_from_slice(__input);
23296            Bytes::new(&payload_buf)
23297        } else {
23298            Bytes::new(__input)
23299        };
23300        let mut __struct = Self::default();
23301        __struct.usec = buf.get_u64_le();
23302        __struct.x = buf.get_f32_le();
23303        __struct.y = buf.get_f32_le();
23304        __struct.z = buf.get_f32_le();
23305        __struct.roll = buf.get_f32_le();
23306        __struct.pitch = buf.get_f32_le();
23307        __struct.yaw = buf.get_f32_le();
23308        for v in &mut __struct.covariance {
23309            let val = buf.get_f32_le();
23310            *v = val;
23311        }
23312        __struct.reset_counter = buf.get_u8();
23313        Ok(__struct)
23314    }
23315    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23316        let mut __tmp = BytesMut::new(bytes);
23317        #[allow(clippy::absurd_extreme_comparisons)]
23318        #[allow(unused_comparisons)]
23319        if __tmp.remaining() < Self::ENCODED_LEN {
23320            panic!(
23321                "buffer is too small (need {} bytes, but got {})",
23322                Self::ENCODED_LEN,
23323                __tmp.remaining(),
23324            )
23325        }
23326        __tmp.put_u64_le(self.usec);
23327        __tmp.put_f32_le(self.x);
23328        __tmp.put_f32_le(self.y);
23329        __tmp.put_f32_le(self.z);
23330        __tmp.put_f32_le(self.roll);
23331        __tmp.put_f32_le(self.pitch);
23332        __tmp.put_f32_le(self.yaw);
23333        for val in &self.covariance {
23334            __tmp.put_f32_le(*val);
23335        }
23336        __tmp.put_u8(self.reset_counter);
23337        if matches!(version, MavlinkVersion::V2) {
23338            let len = __tmp.len();
23339            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23340        } else {
23341            __tmp.len()
23342        }
23343    }
23344}
23345#[doc = "id: 148"]
23346#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
23347#[derive(Debug, Clone, PartialEq)]
23348#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23349#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23350pub struct AUTOPILOT_VERSION_DATA {
23351    #[doc = "Bitmap of capabilities"]
23352    pub capabilities: MavProtocolCapability,
23353    #[doc = "UID if provided by hardware (see uid2)"]
23354    pub uid: u64,
23355    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
23356    pub flight_sw_version: u32,
23357    #[doc = "Middleware version number"]
23358    pub middleware_sw_version: u32,
23359    #[doc = "Operating system version number"]
23360    pub os_sw_version: u32,
23361    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
23362    pub board_version: u32,
23363    #[doc = "ID of the board vendor"]
23364    pub vendor_id: u16,
23365    #[doc = "ID of the product"]
23366    pub product_id: u16,
23367    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
23368    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23369    pub flight_custom_version: [u8; 8],
23370    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
23371    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23372    pub middleware_custom_version: [u8; 8],
23373    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
23374    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23375    pub os_custom_version: [u8; 8],
23376    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
23377    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23378    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23379    pub uid2: [u8; 18],
23380}
23381impl AUTOPILOT_VERSION_DATA {
23382    pub const ENCODED_LEN: usize = 78usize;
23383    pub const DEFAULT: Self = Self {
23384        capabilities: MavProtocolCapability::DEFAULT,
23385        uid: 0_u64,
23386        flight_sw_version: 0_u32,
23387        middleware_sw_version: 0_u32,
23388        os_sw_version: 0_u32,
23389        board_version: 0_u32,
23390        vendor_id: 0_u16,
23391        product_id: 0_u16,
23392        flight_custom_version: [0_u8; 8usize],
23393        middleware_custom_version: [0_u8; 8usize],
23394        os_custom_version: [0_u8; 8usize],
23395        uid2: [0_u8; 18usize],
23396    };
23397    #[cfg(feature = "arbitrary")]
23398    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23399        use arbitrary::{Arbitrary, Unstructured};
23400        let mut buf = [0u8; 1024];
23401        rng.fill_bytes(&mut buf);
23402        let mut unstructured = Unstructured::new(&buf);
23403        Self::arbitrary(&mut unstructured).unwrap_or_default()
23404    }
23405}
23406impl Default for AUTOPILOT_VERSION_DATA {
23407    fn default() -> Self {
23408        Self::DEFAULT.clone()
23409    }
23410}
23411impl MessageData for AUTOPILOT_VERSION_DATA {
23412    type Message = MavMessage;
23413    const ID: u32 = 148u32;
23414    const NAME: &'static str = "AUTOPILOT_VERSION";
23415    const EXTRA_CRC: u8 = 178u8;
23416    const ENCODED_LEN: usize = 78usize;
23417    fn deser(
23418        _version: MavlinkVersion,
23419        __input: &[u8],
23420    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23421        let avail_len = __input.len();
23422        let mut payload_buf = [0; Self::ENCODED_LEN];
23423        let mut buf = if avail_len < Self::ENCODED_LEN {
23424            payload_buf[0..avail_len].copy_from_slice(__input);
23425            Bytes::new(&payload_buf)
23426        } else {
23427            Bytes::new(__input)
23428        };
23429        let mut __struct = Self::default();
23430        let tmp = buf.get_u64_le();
23431        __struct.capabilities = MavProtocolCapability::from_bits(
23432            tmp & MavProtocolCapability::all().bits(),
23433        )
23434        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
23435            flag_type: "MavProtocolCapability",
23436            value: tmp as u32,
23437        })?;
23438        __struct.uid = buf.get_u64_le();
23439        __struct.flight_sw_version = buf.get_u32_le();
23440        __struct.middleware_sw_version = buf.get_u32_le();
23441        __struct.os_sw_version = buf.get_u32_le();
23442        __struct.board_version = buf.get_u32_le();
23443        __struct.vendor_id = buf.get_u16_le();
23444        __struct.product_id = buf.get_u16_le();
23445        for v in &mut __struct.flight_custom_version {
23446            let val = buf.get_u8();
23447            *v = val;
23448        }
23449        for v in &mut __struct.middleware_custom_version {
23450            let val = buf.get_u8();
23451            *v = val;
23452        }
23453        for v in &mut __struct.os_custom_version {
23454            let val = buf.get_u8();
23455            *v = val;
23456        }
23457        for v in &mut __struct.uid2 {
23458            let val = buf.get_u8();
23459            *v = val;
23460        }
23461        Ok(__struct)
23462    }
23463    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23464        let mut __tmp = BytesMut::new(bytes);
23465        #[allow(clippy::absurd_extreme_comparisons)]
23466        #[allow(unused_comparisons)]
23467        if __tmp.remaining() < Self::ENCODED_LEN {
23468            panic!(
23469                "buffer is too small (need {} bytes, but got {})",
23470                Self::ENCODED_LEN,
23471                __tmp.remaining(),
23472            )
23473        }
23474        __tmp.put_u64_le(self.capabilities.bits());
23475        __tmp.put_u64_le(self.uid);
23476        __tmp.put_u32_le(self.flight_sw_version);
23477        __tmp.put_u32_le(self.middleware_sw_version);
23478        __tmp.put_u32_le(self.os_sw_version);
23479        __tmp.put_u32_le(self.board_version);
23480        __tmp.put_u16_le(self.vendor_id);
23481        __tmp.put_u16_le(self.product_id);
23482        for val in &self.flight_custom_version {
23483            __tmp.put_u8(*val);
23484        }
23485        for val in &self.middleware_custom_version {
23486            __tmp.put_u8(*val);
23487        }
23488        for val in &self.os_custom_version {
23489            __tmp.put_u8(*val);
23490        }
23491        for val in &self.uid2 {
23492            __tmp.put_u8(*val);
23493        }
23494        if matches!(version, MavlinkVersion::V2) {
23495            let len = __tmp.len();
23496            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23497        } else {
23498            __tmp.len()
23499        }
23500    }
23501}
23502#[doc = "id: 12920"]
23503#[doc = "Temperature and humidity from hygrometer."]
23504#[derive(Debug, Clone, PartialEq)]
23505#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23506#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23507pub struct HYGROMETER_SENSOR_DATA {
23508    #[doc = "Temperature"]
23509    pub temperature: i16,
23510    #[doc = "Humidity"]
23511    pub humidity: u16,
23512    #[doc = "Hygrometer ID"]
23513    pub id: u8,
23514}
23515impl HYGROMETER_SENSOR_DATA {
23516    pub const ENCODED_LEN: usize = 5usize;
23517    pub const DEFAULT: Self = Self {
23518        temperature: 0_i16,
23519        humidity: 0_u16,
23520        id: 0_u8,
23521    };
23522    #[cfg(feature = "arbitrary")]
23523    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23524        use arbitrary::{Arbitrary, Unstructured};
23525        let mut buf = [0u8; 1024];
23526        rng.fill_bytes(&mut buf);
23527        let mut unstructured = Unstructured::new(&buf);
23528        Self::arbitrary(&mut unstructured).unwrap_or_default()
23529    }
23530}
23531impl Default for HYGROMETER_SENSOR_DATA {
23532    fn default() -> Self {
23533        Self::DEFAULT.clone()
23534    }
23535}
23536impl MessageData for HYGROMETER_SENSOR_DATA {
23537    type Message = MavMessage;
23538    const ID: u32 = 12920u32;
23539    const NAME: &'static str = "HYGROMETER_SENSOR";
23540    const EXTRA_CRC: u8 = 20u8;
23541    const ENCODED_LEN: usize = 5usize;
23542    fn deser(
23543        _version: MavlinkVersion,
23544        __input: &[u8],
23545    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23546        let avail_len = __input.len();
23547        let mut payload_buf = [0; Self::ENCODED_LEN];
23548        let mut buf = if avail_len < Self::ENCODED_LEN {
23549            payload_buf[0..avail_len].copy_from_slice(__input);
23550            Bytes::new(&payload_buf)
23551        } else {
23552            Bytes::new(__input)
23553        };
23554        let mut __struct = Self::default();
23555        __struct.temperature = buf.get_i16_le();
23556        __struct.humidity = buf.get_u16_le();
23557        __struct.id = buf.get_u8();
23558        Ok(__struct)
23559    }
23560    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23561        let mut __tmp = BytesMut::new(bytes);
23562        #[allow(clippy::absurd_extreme_comparisons)]
23563        #[allow(unused_comparisons)]
23564        if __tmp.remaining() < Self::ENCODED_LEN {
23565            panic!(
23566                "buffer is too small (need {} bytes, but got {})",
23567                Self::ENCODED_LEN,
23568                __tmp.remaining(),
23569            )
23570        }
23571        __tmp.put_i16_le(self.temperature);
23572        __tmp.put_u16_le(self.humidity);
23573        __tmp.put_u8(self.id);
23574        if matches!(version, MavlinkVersion::V2) {
23575            let len = __tmp.len();
23576            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23577        } else {
23578            __tmp.len()
23579        }
23580    }
23581}
23582#[doc = "id: 437"]
23583#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
23584#[derive(Debug, Clone, PartialEq)]
23585#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23586#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23587pub struct AVAILABLE_MODES_MONITOR_DATA {
23588    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
23589    pub seq: u8,
23590}
23591impl AVAILABLE_MODES_MONITOR_DATA {
23592    pub const ENCODED_LEN: usize = 1usize;
23593    pub const DEFAULT: Self = Self { seq: 0_u8 };
23594    #[cfg(feature = "arbitrary")]
23595    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23596        use arbitrary::{Arbitrary, Unstructured};
23597        let mut buf = [0u8; 1024];
23598        rng.fill_bytes(&mut buf);
23599        let mut unstructured = Unstructured::new(&buf);
23600        Self::arbitrary(&mut unstructured).unwrap_or_default()
23601    }
23602}
23603impl Default for AVAILABLE_MODES_MONITOR_DATA {
23604    fn default() -> Self {
23605        Self::DEFAULT.clone()
23606    }
23607}
23608impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
23609    type Message = MavMessage;
23610    const ID: u32 = 437u32;
23611    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
23612    const EXTRA_CRC: u8 = 30u8;
23613    const ENCODED_LEN: usize = 1usize;
23614    fn deser(
23615        _version: MavlinkVersion,
23616        __input: &[u8],
23617    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23618        let avail_len = __input.len();
23619        let mut payload_buf = [0; Self::ENCODED_LEN];
23620        let mut buf = if avail_len < Self::ENCODED_LEN {
23621            payload_buf[0..avail_len].copy_from_slice(__input);
23622            Bytes::new(&payload_buf)
23623        } else {
23624            Bytes::new(__input)
23625        };
23626        let mut __struct = Self::default();
23627        __struct.seq = buf.get_u8();
23628        Ok(__struct)
23629    }
23630    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23631        let mut __tmp = BytesMut::new(bytes);
23632        #[allow(clippy::absurd_extreme_comparisons)]
23633        #[allow(unused_comparisons)]
23634        if __tmp.remaining() < Self::ENCODED_LEN {
23635            panic!(
23636                "buffer is too small (need {} bytes, but got {})",
23637                Self::ENCODED_LEN,
23638                __tmp.remaining(),
23639            )
23640        }
23641        __tmp.put_u8(self.seq);
23642        if matches!(version, MavlinkVersion::V2) {
23643            let len = __tmp.len();
23644            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23645        } else {
23646            __tmp.len()
23647        }
23648    }
23649}
23650#[doc = "id: 435"]
23651#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
23652#[derive(Debug, Clone, PartialEq)]
23653#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23654#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23655pub struct AVAILABLE_MODES_DATA {
23656    #[doc = "A bitfield for use for autopilot-specific flags"]
23657    pub custom_mode: u32,
23658    #[doc = "Mode properties."]
23659    pub properties: MavModeProperty,
23660    #[doc = "The total number of available modes for the current vehicle type."]
23661    pub number_modes: u8,
23662    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
23663    pub mode_index: u8,
23664    #[doc = "Standard mode."]
23665    pub standard_mode: MavStandardMode,
23666    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
23667    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23668    pub mode_name: [u8; 35],
23669}
23670impl AVAILABLE_MODES_DATA {
23671    pub const ENCODED_LEN: usize = 46usize;
23672    pub const DEFAULT: Self = Self {
23673        custom_mode: 0_u32,
23674        properties: MavModeProperty::DEFAULT,
23675        number_modes: 0_u8,
23676        mode_index: 0_u8,
23677        standard_mode: MavStandardMode::DEFAULT,
23678        mode_name: [0_u8; 35usize],
23679    };
23680    #[cfg(feature = "arbitrary")]
23681    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23682        use arbitrary::{Arbitrary, Unstructured};
23683        let mut buf = [0u8; 1024];
23684        rng.fill_bytes(&mut buf);
23685        let mut unstructured = Unstructured::new(&buf);
23686        Self::arbitrary(&mut unstructured).unwrap_or_default()
23687    }
23688}
23689impl Default for AVAILABLE_MODES_DATA {
23690    fn default() -> Self {
23691        Self::DEFAULT.clone()
23692    }
23693}
23694impl MessageData for AVAILABLE_MODES_DATA {
23695    type Message = MavMessage;
23696    const ID: u32 = 435u32;
23697    const NAME: &'static str = "AVAILABLE_MODES";
23698    const EXTRA_CRC: u8 = 134u8;
23699    const ENCODED_LEN: usize = 46usize;
23700    fn deser(
23701        _version: MavlinkVersion,
23702        __input: &[u8],
23703    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23704        let avail_len = __input.len();
23705        let mut payload_buf = [0; Self::ENCODED_LEN];
23706        let mut buf = if avail_len < Self::ENCODED_LEN {
23707            payload_buf[0..avail_len].copy_from_slice(__input);
23708            Bytes::new(&payload_buf)
23709        } else {
23710            Bytes::new(__input)
23711        };
23712        let mut __struct = Self::default();
23713        __struct.custom_mode = buf.get_u32_le();
23714        let tmp = buf.get_u32_le();
23715        __struct.properties = MavModeProperty::from_bits(tmp & MavModeProperty::all().bits())
23716            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
23717                flag_type: "MavModeProperty",
23718                value: tmp as u32,
23719            })?;
23720        __struct.number_modes = buf.get_u8();
23721        __struct.mode_index = buf.get_u8();
23722        let tmp = buf.get_u8();
23723        __struct.standard_mode =
23724            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23725                enum_type: "MavStandardMode",
23726                value: tmp as u32,
23727            })?;
23728        for v in &mut __struct.mode_name {
23729            let val = buf.get_u8();
23730            *v = val;
23731        }
23732        Ok(__struct)
23733    }
23734    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23735        let mut __tmp = BytesMut::new(bytes);
23736        #[allow(clippy::absurd_extreme_comparisons)]
23737        #[allow(unused_comparisons)]
23738        if __tmp.remaining() < Self::ENCODED_LEN {
23739            panic!(
23740                "buffer is too small (need {} bytes, but got {})",
23741                Self::ENCODED_LEN,
23742                __tmp.remaining(),
23743            )
23744        }
23745        __tmp.put_u32_le(self.custom_mode);
23746        __tmp.put_u32_le(self.properties.bits());
23747        __tmp.put_u8(self.number_modes);
23748        __tmp.put_u8(self.mode_index);
23749        __tmp.put_u8(self.standard_mode as u8);
23750        for val in &self.mode_name {
23751            __tmp.put_u8(*val);
23752        }
23753        if matches!(version, MavlinkVersion::V2) {
23754            let len = __tmp.len();
23755            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23756        } else {
23757            __tmp.len()
23758        }
23759    }
23760}
23761#[doc = "id: 141"]
23762#[doc = "The current system altitude."]
23763#[derive(Debug, Clone, PartialEq)]
23764#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23765#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23766pub struct ALTITUDE_DATA {
23767    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23768    pub time_usec: u64,
23769    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
23770    pub altitude_monotonic: f32,
23771    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
23772    pub altitude_amsl: f32,
23773    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
23774    pub altitude_local: f32,
23775    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
23776    pub altitude_relative: f32,
23777    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
23778    pub altitude_terrain: f32,
23779    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
23780    pub bottom_clearance: f32,
23781}
23782impl ALTITUDE_DATA {
23783    pub const ENCODED_LEN: usize = 32usize;
23784    pub const DEFAULT: Self = Self {
23785        time_usec: 0_u64,
23786        altitude_monotonic: 0.0_f32,
23787        altitude_amsl: 0.0_f32,
23788        altitude_local: 0.0_f32,
23789        altitude_relative: 0.0_f32,
23790        altitude_terrain: 0.0_f32,
23791        bottom_clearance: 0.0_f32,
23792    };
23793    #[cfg(feature = "arbitrary")]
23794    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23795        use arbitrary::{Arbitrary, Unstructured};
23796        let mut buf = [0u8; 1024];
23797        rng.fill_bytes(&mut buf);
23798        let mut unstructured = Unstructured::new(&buf);
23799        Self::arbitrary(&mut unstructured).unwrap_or_default()
23800    }
23801}
23802impl Default for ALTITUDE_DATA {
23803    fn default() -> Self {
23804        Self::DEFAULT.clone()
23805    }
23806}
23807impl MessageData for ALTITUDE_DATA {
23808    type Message = MavMessage;
23809    const ID: u32 = 141u32;
23810    const NAME: &'static str = "ALTITUDE";
23811    const EXTRA_CRC: u8 = 47u8;
23812    const ENCODED_LEN: usize = 32usize;
23813    fn deser(
23814        _version: MavlinkVersion,
23815        __input: &[u8],
23816    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23817        let avail_len = __input.len();
23818        let mut payload_buf = [0; Self::ENCODED_LEN];
23819        let mut buf = if avail_len < Self::ENCODED_LEN {
23820            payload_buf[0..avail_len].copy_from_slice(__input);
23821            Bytes::new(&payload_buf)
23822        } else {
23823            Bytes::new(__input)
23824        };
23825        let mut __struct = Self::default();
23826        __struct.time_usec = buf.get_u64_le();
23827        __struct.altitude_monotonic = buf.get_f32_le();
23828        __struct.altitude_amsl = buf.get_f32_le();
23829        __struct.altitude_local = buf.get_f32_le();
23830        __struct.altitude_relative = buf.get_f32_le();
23831        __struct.altitude_terrain = buf.get_f32_le();
23832        __struct.bottom_clearance = buf.get_f32_le();
23833        Ok(__struct)
23834    }
23835    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23836        let mut __tmp = BytesMut::new(bytes);
23837        #[allow(clippy::absurd_extreme_comparisons)]
23838        #[allow(unused_comparisons)]
23839        if __tmp.remaining() < Self::ENCODED_LEN {
23840            panic!(
23841                "buffer is too small (need {} bytes, but got {})",
23842                Self::ENCODED_LEN,
23843                __tmp.remaining(),
23844            )
23845        }
23846        __tmp.put_u64_le(self.time_usec);
23847        __tmp.put_f32_le(self.altitude_monotonic);
23848        __tmp.put_f32_le(self.altitude_amsl);
23849        __tmp.put_f32_le(self.altitude_local);
23850        __tmp.put_f32_le(self.altitude_relative);
23851        __tmp.put_f32_le(self.altitude_terrain);
23852        __tmp.put_f32_le(self.bottom_clearance);
23853        if matches!(version, MavlinkVersion::V2) {
23854            let len = __tmp.len();
23855            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23856        } else {
23857            __tmp.len()
23858        }
23859    }
23860}
23861#[doc = "id: 128"]
23862#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
23863#[derive(Debug, Clone, PartialEq)]
23864#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23865#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23866pub struct GPS2_RTK_DATA {
23867    #[doc = "Time since boot of last baseline message received."]
23868    pub time_last_baseline_ms: u32,
23869    #[doc = "GPS Time of Week of last baseline"]
23870    pub tow: u32,
23871    #[doc = "Current baseline in ECEF x or NED north component."]
23872    pub baseline_a_mm: i32,
23873    #[doc = "Current baseline in ECEF y or NED east component."]
23874    pub baseline_b_mm: i32,
23875    #[doc = "Current baseline in ECEF z or NED down component."]
23876    pub baseline_c_mm: i32,
23877    #[doc = "Current estimate of baseline accuracy."]
23878    pub accuracy: u32,
23879    #[doc = "Current number of integer ambiguity hypotheses."]
23880    pub iar_num_hypotheses: i32,
23881    #[doc = "GPS Week Number of last baseline"]
23882    pub wn: u16,
23883    #[doc = "Identification of connected RTK receiver."]
23884    pub rtk_receiver_id: u8,
23885    #[doc = "GPS-specific health report for RTK data."]
23886    pub rtk_health: u8,
23887    #[doc = "Rate of baseline messages being received by GPS"]
23888    pub rtk_rate: u8,
23889    #[doc = "Current number of sats used for RTK calculation."]
23890    pub nsats: u8,
23891    #[doc = "Coordinate system of baseline"]
23892    pub baseline_coords_type: RtkBaselineCoordinateSystem,
23893}
23894impl GPS2_RTK_DATA {
23895    pub const ENCODED_LEN: usize = 35usize;
23896    pub const DEFAULT: Self = Self {
23897        time_last_baseline_ms: 0_u32,
23898        tow: 0_u32,
23899        baseline_a_mm: 0_i32,
23900        baseline_b_mm: 0_i32,
23901        baseline_c_mm: 0_i32,
23902        accuracy: 0_u32,
23903        iar_num_hypotheses: 0_i32,
23904        wn: 0_u16,
23905        rtk_receiver_id: 0_u8,
23906        rtk_health: 0_u8,
23907        rtk_rate: 0_u8,
23908        nsats: 0_u8,
23909        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
23910    };
23911    #[cfg(feature = "arbitrary")]
23912    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23913        use arbitrary::{Arbitrary, Unstructured};
23914        let mut buf = [0u8; 1024];
23915        rng.fill_bytes(&mut buf);
23916        let mut unstructured = Unstructured::new(&buf);
23917        Self::arbitrary(&mut unstructured).unwrap_or_default()
23918    }
23919}
23920impl Default for GPS2_RTK_DATA {
23921    fn default() -> Self {
23922        Self::DEFAULT.clone()
23923    }
23924}
23925impl MessageData for GPS2_RTK_DATA {
23926    type Message = MavMessage;
23927    const ID: u32 = 128u32;
23928    const NAME: &'static str = "GPS2_RTK";
23929    const EXTRA_CRC: u8 = 226u8;
23930    const ENCODED_LEN: usize = 35usize;
23931    fn deser(
23932        _version: MavlinkVersion,
23933        __input: &[u8],
23934    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23935        let avail_len = __input.len();
23936        let mut payload_buf = [0; Self::ENCODED_LEN];
23937        let mut buf = if avail_len < Self::ENCODED_LEN {
23938            payload_buf[0..avail_len].copy_from_slice(__input);
23939            Bytes::new(&payload_buf)
23940        } else {
23941            Bytes::new(__input)
23942        };
23943        let mut __struct = Self::default();
23944        __struct.time_last_baseline_ms = buf.get_u32_le();
23945        __struct.tow = buf.get_u32_le();
23946        __struct.baseline_a_mm = buf.get_i32_le();
23947        __struct.baseline_b_mm = buf.get_i32_le();
23948        __struct.baseline_c_mm = buf.get_i32_le();
23949        __struct.accuracy = buf.get_u32_le();
23950        __struct.iar_num_hypotheses = buf.get_i32_le();
23951        __struct.wn = buf.get_u16_le();
23952        __struct.rtk_receiver_id = buf.get_u8();
23953        __struct.rtk_health = buf.get_u8();
23954        __struct.rtk_rate = buf.get_u8();
23955        __struct.nsats = buf.get_u8();
23956        let tmp = buf.get_u8();
23957        __struct.baseline_coords_type =
23958            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23959                enum_type: "RtkBaselineCoordinateSystem",
23960                value: tmp as u32,
23961            })?;
23962        Ok(__struct)
23963    }
23964    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23965        let mut __tmp = BytesMut::new(bytes);
23966        #[allow(clippy::absurd_extreme_comparisons)]
23967        #[allow(unused_comparisons)]
23968        if __tmp.remaining() < Self::ENCODED_LEN {
23969            panic!(
23970                "buffer is too small (need {} bytes, but got {})",
23971                Self::ENCODED_LEN,
23972                __tmp.remaining(),
23973            )
23974        }
23975        __tmp.put_u32_le(self.time_last_baseline_ms);
23976        __tmp.put_u32_le(self.tow);
23977        __tmp.put_i32_le(self.baseline_a_mm);
23978        __tmp.put_i32_le(self.baseline_b_mm);
23979        __tmp.put_i32_le(self.baseline_c_mm);
23980        __tmp.put_u32_le(self.accuracy);
23981        __tmp.put_i32_le(self.iar_num_hypotheses);
23982        __tmp.put_u16_le(self.wn);
23983        __tmp.put_u8(self.rtk_receiver_id);
23984        __tmp.put_u8(self.rtk_health);
23985        __tmp.put_u8(self.rtk_rate);
23986        __tmp.put_u8(self.nsats);
23987        __tmp.put_u8(self.baseline_coords_type as u8);
23988        if matches!(version, MavlinkVersion::V2) {
23989            let len = __tmp.len();
23990            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23991        } else {
23992            __tmp.len()
23993        }
23994    }
23995}
23996#[doc = "id: 51"]
23997#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
23998#[derive(Debug, Clone, PartialEq)]
23999#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24000#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24001pub struct MISSION_REQUEST_INT_DATA {
24002    #[doc = "Sequence"]
24003    pub seq: u16,
24004    #[doc = "System ID"]
24005    pub target_system: u8,
24006    #[doc = "Component ID"]
24007    pub target_component: u8,
24008    #[doc = "Mission type."]
24009    #[cfg_attr(feature = "serde", serde(default))]
24010    pub mission_type: MavMissionType,
24011}
24012impl MISSION_REQUEST_INT_DATA {
24013    pub const ENCODED_LEN: usize = 5usize;
24014    pub const DEFAULT: Self = Self {
24015        seq: 0_u16,
24016        target_system: 0_u8,
24017        target_component: 0_u8,
24018        mission_type: MavMissionType::DEFAULT,
24019    };
24020    #[cfg(feature = "arbitrary")]
24021    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24022        use arbitrary::{Arbitrary, Unstructured};
24023        let mut buf = [0u8; 1024];
24024        rng.fill_bytes(&mut buf);
24025        let mut unstructured = Unstructured::new(&buf);
24026        Self::arbitrary(&mut unstructured).unwrap_or_default()
24027    }
24028}
24029impl Default for MISSION_REQUEST_INT_DATA {
24030    fn default() -> Self {
24031        Self::DEFAULT.clone()
24032    }
24033}
24034impl MessageData for MISSION_REQUEST_INT_DATA {
24035    type Message = MavMessage;
24036    const ID: u32 = 51u32;
24037    const NAME: &'static str = "MISSION_REQUEST_INT";
24038    const EXTRA_CRC: u8 = 196u8;
24039    const ENCODED_LEN: usize = 5usize;
24040    fn deser(
24041        _version: MavlinkVersion,
24042        __input: &[u8],
24043    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24044        let avail_len = __input.len();
24045        let mut payload_buf = [0; Self::ENCODED_LEN];
24046        let mut buf = if avail_len < Self::ENCODED_LEN {
24047            payload_buf[0..avail_len].copy_from_slice(__input);
24048            Bytes::new(&payload_buf)
24049        } else {
24050            Bytes::new(__input)
24051        };
24052        let mut __struct = Self::default();
24053        __struct.seq = buf.get_u16_le();
24054        __struct.target_system = buf.get_u8();
24055        __struct.target_component = buf.get_u8();
24056        let tmp = buf.get_u8();
24057        __struct.mission_type =
24058            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24059                enum_type: "MavMissionType",
24060                value: tmp as u32,
24061            })?;
24062        Ok(__struct)
24063    }
24064    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24065        let mut __tmp = BytesMut::new(bytes);
24066        #[allow(clippy::absurd_extreme_comparisons)]
24067        #[allow(unused_comparisons)]
24068        if __tmp.remaining() < Self::ENCODED_LEN {
24069            panic!(
24070                "buffer is too small (need {} bytes, but got {})",
24071                Self::ENCODED_LEN,
24072                __tmp.remaining(),
24073            )
24074        }
24075        __tmp.put_u16_le(self.seq);
24076        __tmp.put_u8(self.target_system);
24077        __tmp.put_u8(self.target_component);
24078        __tmp.put_u8(self.mission_type as u8);
24079        if matches!(version, MavlinkVersion::V2) {
24080            let len = __tmp.len();
24081            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24082        } else {
24083            __tmp.len()
24084        }
24085    }
24086}
24087#[doc = "id: 142"]
24088#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
24089#[derive(Debug, Clone, PartialEq)]
24090#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24091#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24092pub struct RESOURCE_REQUEST_DATA {
24093    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
24094    pub request_id: u8,
24095    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
24096    pub uri_type: u8,
24097    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
24098    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24099    pub uri: [u8; 120],
24100    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
24101    pub transfer_type: u8,
24102    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
24103    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24104    pub storage: [u8; 120],
24105}
24106impl RESOURCE_REQUEST_DATA {
24107    pub const ENCODED_LEN: usize = 243usize;
24108    pub const DEFAULT: Self = Self {
24109        request_id: 0_u8,
24110        uri_type: 0_u8,
24111        uri: [0_u8; 120usize],
24112        transfer_type: 0_u8,
24113        storage: [0_u8; 120usize],
24114    };
24115    #[cfg(feature = "arbitrary")]
24116    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24117        use arbitrary::{Arbitrary, Unstructured};
24118        let mut buf = [0u8; 1024];
24119        rng.fill_bytes(&mut buf);
24120        let mut unstructured = Unstructured::new(&buf);
24121        Self::arbitrary(&mut unstructured).unwrap_or_default()
24122    }
24123}
24124impl Default for RESOURCE_REQUEST_DATA {
24125    fn default() -> Self {
24126        Self::DEFAULT.clone()
24127    }
24128}
24129impl MessageData for RESOURCE_REQUEST_DATA {
24130    type Message = MavMessage;
24131    const ID: u32 = 142u32;
24132    const NAME: &'static str = "RESOURCE_REQUEST";
24133    const EXTRA_CRC: u8 = 72u8;
24134    const ENCODED_LEN: usize = 243usize;
24135    fn deser(
24136        _version: MavlinkVersion,
24137        __input: &[u8],
24138    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24139        let avail_len = __input.len();
24140        let mut payload_buf = [0; Self::ENCODED_LEN];
24141        let mut buf = if avail_len < Self::ENCODED_LEN {
24142            payload_buf[0..avail_len].copy_from_slice(__input);
24143            Bytes::new(&payload_buf)
24144        } else {
24145            Bytes::new(__input)
24146        };
24147        let mut __struct = Self::default();
24148        __struct.request_id = buf.get_u8();
24149        __struct.uri_type = buf.get_u8();
24150        for v in &mut __struct.uri {
24151            let val = buf.get_u8();
24152            *v = val;
24153        }
24154        __struct.transfer_type = buf.get_u8();
24155        for v in &mut __struct.storage {
24156            let val = buf.get_u8();
24157            *v = val;
24158        }
24159        Ok(__struct)
24160    }
24161    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24162        let mut __tmp = BytesMut::new(bytes);
24163        #[allow(clippy::absurd_extreme_comparisons)]
24164        #[allow(unused_comparisons)]
24165        if __tmp.remaining() < Self::ENCODED_LEN {
24166            panic!(
24167                "buffer is too small (need {} bytes, but got {})",
24168                Self::ENCODED_LEN,
24169                __tmp.remaining(),
24170            )
24171        }
24172        __tmp.put_u8(self.request_id);
24173        __tmp.put_u8(self.uri_type);
24174        for val in &self.uri {
24175            __tmp.put_u8(*val);
24176        }
24177        __tmp.put_u8(self.transfer_type);
24178        for val in &self.storage {
24179            __tmp.put_u8(*val);
24180        }
24181        if matches!(version, MavlinkVersion::V2) {
24182            let len = __tmp.len();
24183            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24184        } else {
24185            __tmp.len()
24186        }
24187    }
24188}
24189#[doc = "id: 34"]
24190#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
24191#[derive(Debug, Clone, PartialEq)]
24192#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24193#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24194pub struct RC_CHANNELS_SCALED_DATA {
24195    #[doc = "Timestamp (time since system boot)."]
24196    pub time_boot_ms: u32,
24197    #[doc = "RC channel 1 value scaled."]
24198    pub chan1_scaled: i16,
24199    #[doc = "RC channel 2 value scaled."]
24200    pub chan2_scaled: i16,
24201    #[doc = "RC channel 3 value scaled."]
24202    pub chan3_scaled: i16,
24203    #[doc = "RC channel 4 value scaled."]
24204    pub chan4_scaled: i16,
24205    #[doc = "RC channel 5 value scaled."]
24206    pub chan5_scaled: i16,
24207    #[doc = "RC channel 6 value scaled."]
24208    pub chan6_scaled: i16,
24209    #[doc = "RC channel 7 value scaled."]
24210    pub chan7_scaled: i16,
24211    #[doc = "RC channel 8 value scaled."]
24212    pub chan8_scaled: i16,
24213    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
24214    pub port: u8,
24215    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
24216    pub rssi: u8,
24217}
24218impl RC_CHANNELS_SCALED_DATA {
24219    pub const ENCODED_LEN: usize = 22usize;
24220    pub const DEFAULT: Self = Self {
24221        time_boot_ms: 0_u32,
24222        chan1_scaled: 0_i16,
24223        chan2_scaled: 0_i16,
24224        chan3_scaled: 0_i16,
24225        chan4_scaled: 0_i16,
24226        chan5_scaled: 0_i16,
24227        chan6_scaled: 0_i16,
24228        chan7_scaled: 0_i16,
24229        chan8_scaled: 0_i16,
24230        port: 0_u8,
24231        rssi: 0_u8,
24232    };
24233    #[cfg(feature = "arbitrary")]
24234    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24235        use arbitrary::{Arbitrary, Unstructured};
24236        let mut buf = [0u8; 1024];
24237        rng.fill_bytes(&mut buf);
24238        let mut unstructured = Unstructured::new(&buf);
24239        Self::arbitrary(&mut unstructured).unwrap_or_default()
24240    }
24241}
24242impl Default for RC_CHANNELS_SCALED_DATA {
24243    fn default() -> Self {
24244        Self::DEFAULT.clone()
24245    }
24246}
24247impl MessageData for RC_CHANNELS_SCALED_DATA {
24248    type Message = MavMessage;
24249    const ID: u32 = 34u32;
24250    const NAME: &'static str = "RC_CHANNELS_SCALED";
24251    const EXTRA_CRC: u8 = 237u8;
24252    const ENCODED_LEN: usize = 22usize;
24253    fn deser(
24254        _version: MavlinkVersion,
24255        __input: &[u8],
24256    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24257        let avail_len = __input.len();
24258        let mut payload_buf = [0; Self::ENCODED_LEN];
24259        let mut buf = if avail_len < Self::ENCODED_LEN {
24260            payload_buf[0..avail_len].copy_from_slice(__input);
24261            Bytes::new(&payload_buf)
24262        } else {
24263            Bytes::new(__input)
24264        };
24265        let mut __struct = Self::default();
24266        __struct.time_boot_ms = buf.get_u32_le();
24267        __struct.chan1_scaled = buf.get_i16_le();
24268        __struct.chan2_scaled = buf.get_i16_le();
24269        __struct.chan3_scaled = buf.get_i16_le();
24270        __struct.chan4_scaled = buf.get_i16_le();
24271        __struct.chan5_scaled = buf.get_i16_le();
24272        __struct.chan6_scaled = buf.get_i16_le();
24273        __struct.chan7_scaled = buf.get_i16_le();
24274        __struct.chan8_scaled = buf.get_i16_le();
24275        __struct.port = buf.get_u8();
24276        __struct.rssi = buf.get_u8();
24277        Ok(__struct)
24278    }
24279    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24280        let mut __tmp = BytesMut::new(bytes);
24281        #[allow(clippy::absurd_extreme_comparisons)]
24282        #[allow(unused_comparisons)]
24283        if __tmp.remaining() < Self::ENCODED_LEN {
24284            panic!(
24285                "buffer is too small (need {} bytes, but got {})",
24286                Self::ENCODED_LEN,
24287                __tmp.remaining(),
24288            )
24289        }
24290        __tmp.put_u32_le(self.time_boot_ms);
24291        __tmp.put_i16_le(self.chan1_scaled);
24292        __tmp.put_i16_le(self.chan2_scaled);
24293        __tmp.put_i16_le(self.chan3_scaled);
24294        __tmp.put_i16_le(self.chan4_scaled);
24295        __tmp.put_i16_le(self.chan5_scaled);
24296        __tmp.put_i16_le(self.chan6_scaled);
24297        __tmp.put_i16_le(self.chan7_scaled);
24298        __tmp.put_i16_le(self.chan8_scaled);
24299        __tmp.put_u8(self.port);
24300        __tmp.put_u8(self.rssi);
24301        if matches!(version, MavlinkVersion::V2) {
24302            let len = __tmp.len();
24303            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24304        } else {
24305            __tmp.len()
24306        }
24307    }
24308}
24309#[doc = "id: 39"]
24310#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
24311#[derive(Debug, Clone, PartialEq)]
24312#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24314pub struct MISSION_ITEM_DATA {
24315    #[doc = "PARAM1, see MAV_CMD enum"]
24316    pub param1: f32,
24317    #[doc = "PARAM2, see MAV_CMD enum"]
24318    pub param2: f32,
24319    #[doc = "PARAM3, see MAV_CMD enum"]
24320    pub param3: f32,
24321    #[doc = "PARAM4, see MAV_CMD enum"]
24322    pub param4: f32,
24323    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
24324    pub x: f32,
24325    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
24326    pub y: f32,
24327    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
24328    pub z: f32,
24329    #[doc = "Sequence"]
24330    pub seq: u16,
24331    #[doc = "The scheduled action for the waypoint."]
24332    pub command: MavCmd,
24333    #[doc = "System ID"]
24334    pub target_system: u8,
24335    #[doc = "Component ID"]
24336    pub target_component: u8,
24337    #[doc = "The coordinate system of the waypoint."]
24338    pub frame: MavFrame,
24339    #[doc = "false:0, true:1"]
24340    pub current: u8,
24341    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
24342    pub autocontinue: u8,
24343    #[doc = "Mission type."]
24344    #[cfg_attr(feature = "serde", serde(default))]
24345    pub mission_type: MavMissionType,
24346}
24347impl MISSION_ITEM_DATA {
24348    pub const ENCODED_LEN: usize = 38usize;
24349    pub const DEFAULT: Self = Self {
24350        param1: 0.0_f32,
24351        param2: 0.0_f32,
24352        param3: 0.0_f32,
24353        param4: 0.0_f32,
24354        x: 0.0_f32,
24355        y: 0.0_f32,
24356        z: 0.0_f32,
24357        seq: 0_u16,
24358        command: MavCmd::DEFAULT,
24359        target_system: 0_u8,
24360        target_component: 0_u8,
24361        frame: MavFrame::DEFAULT,
24362        current: 0_u8,
24363        autocontinue: 0_u8,
24364        mission_type: MavMissionType::DEFAULT,
24365    };
24366    #[cfg(feature = "arbitrary")]
24367    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24368        use arbitrary::{Arbitrary, Unstructured};
24369        let mut buf = [0u8; 1024];
24370        rng.fill_bytes(&mut buf);
24371        let mut unstructured = Unstructured::new(&buf);
24372        Self::arbitrary(&mut unstructured).unwrap_or_default()
24373    }
24374}
24375impl Default for MISSION_ITEM_DATA {
24376    fn default() -> Self {
24377        Self::DEFAULT.clone()
24378    }
24379}
24380impl MessageData for MISSION_ITEM_DATA {
24381    type Message = MavMessage;
24382    const ID: u32 = 39u32;
24383    const NAME: &'static str = "MISSION_ITEM";
24384    const EXTRA_CRC: u8 = 254u8;
24385    const ENCODED_LEN: usize = 38usize;
24386    fn deser(
24387        _version: MavlinkVersion,
24388        __input: &[u8],
24389    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24390        let avail_len = __input.len();
24391        let mut payload_buf = [0; Self::ENCODED_LEN];
24392        let mut buf = if avail_len < Self::ENCODED_LEN {
24393            payload_buf[0..avail_len].copy_from_slice(__input);
24394            Bytes::new(&payload_buf)
24395        } else {
24396            Bytes::new(__input)
24397        };
24398        let mut __struct = Self::default();
24399        __struct.param1 = buf.get_f32_le();
24400        __struct.param2 = buf.get_f32_le();
24401        __struct.param3 = buf.get_f32_le();
24402        __struct.param4 = buf.get_f32_le();
24403        __struct.x = buf.get_f32_le();
24404        __struct.y = buf.get_f32_le();
24405        __struct.z = buf.get_f32_le();
24406        __struct.seq = buf.get_u16_le();
24407        let tmp = buf.get_u16_le();
24408        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
24409            ::mavlink_core::error::ParserError::InvalidEnum {
24410                enum_type: "MavCmd",
24411                value: tmp as u32,
24412            },
24413        )?;
24414        __struct.target_system = buf.get_u8();
24415        __struct.target_component = buf.get_u8();
24416        let tmp = buf.get_u8();
24417        __struct.frame =
24418            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24419                enum_type: "MavFrame",
24420                value: tmp as u32,
24421            })?;
24422        __struct.current = buf.get_u8();
24423        __struct.autocontinue = buf.get_u8();
24424        let tmp = buf.get_u8();
24425        __struct.mission_type =
24426            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24427                enum_type: "MavMissionType",
24428                value: tmp as u32,
24429            })?;
24430        Ok(__struct)
24431    }
24432    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24433        let mut __tmp = BytesMut::new(bytes);
24434        #[allow(clippy::absurd_extreme_comparisons)]
24435        #[allow(unused_comparisons)]
24436        if __tmp.remaining() < Self::ENCODED_LEN {
24437            panic!(
24438                "buffer is too small (need {} bytes, but got {})",
24439                Self::ENCODED_LEN,
24440                __tmp.remaining(),
24441            )
24442        }
24443        __tmp.put_f32_le(self.param1);
24444        __tmp.put_f32_le(self.param2);
24445        __tmp.put_f32_le(self.param3);
24446        __tmp.put_f32_le(self.param4);
24447        __tmp.put_f32_le(self.x);
24448        __tmp.put_f32_le(self.y);
24449        __tmp.put_f32_le(self.z);
24450        __tmp.put_u16_le(self.seq);
24451        __tmp.put_u16_le(self.command as u16);
24452        __tmp.put_u8(self.target_system);
24453        __tmp.put_u8(self.target_component);
24454        __tmp.put_u8(self.frame as u8);
24455        __tmp.put_u8(self.current);
24456        __tmp.put_u8(self.autocontinue);
24457        __tmp.put_u8(self.mission_type as u8);
24458        if matches!(version, MavlinkVersion::V2) {
24459            let len = __tmp.len();
24460            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24461        } else {
24462            __tmp.len()
24463        }
24464    }
24465}
24466#[doc = "id: 12900"]
24467#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
24468#[derive(Debug, Clone, PartialEq)]
24469#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24470#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24471pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
24472    #[doc = "System ID (0 for broadcast)."]
24473    pub target_system: u8,
24474    #[doc = "Component ID (0 for broadcast)."]
24475    pub target_component: u8,
24476    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
24477    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24478    pub id_or_mac: [u8; 20],
24479    #[doc = "Indicates the format for the uas_id field of this message."]
24480    pub id_type: MavOdidIdType,
24481    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
24482    pub ua_type: MavOdidUaType,
24483    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
24484    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24485    pub uas_id: [u8; 20],
24486}
24487impl OPEN_DRONE_ID_BASIC_ID_DATA {
24488    pub const ENCODED_LEN: usize = 44usize;
24489    pub const DEFAULT: Self = Self {
24490        target_system: 0_u8,
24491        target_component: 0_u8,
24492        id_or_mac: [0_u8; 20usize],
24493        id_type: MavOdidIdType::DEFAULT,
24494        ua_type: MavOdidUaType::DEFAULT,
24495        uas_id: [0_u8; 20usize],
24496    };
24497    #[cfg(feature = "arbitrary")]
24498    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24499        use arbitrary::{Arbitrary, Unstructured};
24500        let mut buf = [0u8; 1024];
24501        rng.fill_bytes(&mut buf);
24502        let mut unstructured = Unstructured::new(&buf);
24503        Self::arbitrary(&mut unstructured).unwrap_or_default()
24504    }
24505}
24506impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
24507    fn default() -> Self {
24508        Self::DEFAULT.clone()
24509    }
24510}
24511impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
24512    type Message = MavMessage;
24513    const ID: u32 = 12900u32;
24514    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
24515    const EXTRA_CRC: u8 = 114u8;
24516    const ENCODED_LEN: usize = 44usize;
24517    fn deser(
24518        _version: MavlinkVersion,
24519        __input: &[u8],
24520    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24521        let avail_len = __input.len();
24522        let mut payload_buf = [0; Self::ENCODED_LEN];
24523        let mut buf = if avail_len < Self::ENCODED_LEN {
24524            payload_buf[0..avail_len].copy_from_slice(__input);
24525            Bytes::new(&payload_buf)
24526        } else {
24527            Bytes::new(__input)
24528        };
24529        let mut __struct = Self::default();
24530        __struct.target_system = buf.get_u8();
24531        __struct.target_component = buf.get_u8();
24532        for v in &mut __struct.id_or_mac {
24533            let val = buf.get_u8();
24534            *v = val;
24535        }
24536        let tmp = buf.get_u8();
24537        __struct.id_type =
24538            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24539                enum_type: "MavOdidIdType",
24540                value: tmp as u32,
24541            })?;
24542        let tmp = buf.get_u8();
24543        __struct.ua_type =
24544            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24545                enum_type: "MavOdidUaType",
24546                value: tmp as u32,
24547            })?;
24548        for v in &mut __struct.uas_id {
24549            let val = buf.get_u8();
24550            *v = val;
24551        }
24552        Ok(__struct)
24553    }
24554    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24555        let mut __tmp = BytesMut::new(bytes);
24556        #[allow(clippy::absurd_extreme_comparisons)]
24557        #[allow(unused_comparisons)]
24558        if __tmp.remaining() < Self::ENCODED_LEN {
24559            panic!(
24560                "buffer is too small (need {} bytes, but got {})",
24561                Self::ENCODED_LEN,
24562                __tmp.remaining(),
24563            )
24564        }
24565        __tmp.put_u8(self.target_system);
24566        __tmp.put_u8(self.target_component);
24567        for val in &self.id_or_mac {
24568            __tmp.put_u8(*val);
24569        }
24570        __tmp.put_u8(self.id_type as u8);
24571        __tmp.put_u8(self.ua_type as u8);
24572        for val in &self.uas_id {
24573            __tmp.put_u8(*val);
24574        }
24575        if matches!(version, MavlinkVersion::V2) {
24576            let len = __tmp.len();
24577            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24578        } else {
24579            __tmp.len()
24580        }
24581    }
24582}
24583#[doc = "id: 46"]
24584#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
24585#[derive(Debug, Clone, PartialEq)]
24586#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24587#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24588pub struct MISSION_ITEM_REACHED_DATA {
24589    #[doc = "Sequence"]
24590    pub seq: u16,
24591}
24592impl MISSION_ITEM_REACHED_DATA {
24593    pub const ENCODED_LEN: usize = 2usize;
24594    pub const DEFAULT: Self = Self { seq: 0_u16 };
24595    #[cfg(feature = "arbitrary")]
24596    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24597        use arbitrary::{Arbitrary, Unstructured};
24598        let mut buf = [0u8; 1024];
24599        rng.fill_bytes(&mut buf);
24600        let mut unstructured = Unstructured::new(&buf);
24601        Self::arbitrary(&mut unstructured).unwrap_or_default()
24602    }
24603}
24604impl Default for MISSION_ITEM_REACHED_DATA {
24605    fn default() -> Self {
24606        Self::DEFAULT.clone()
24607    }
24608}
24609impl MessageData for MISSION_ITEM_REACHED_DATA {
24610    type Message = MavMessage;
24611    const ID: u32 = 46u32;
24612    const NAME: &'static str = "MISSION_ITEM_REACHED";
24613    const EXTRA_CRC: u8 = 11u8;
24614    const ENCODED_LEN: usize = 2usize;
24615    fn deser(
24616        _version: MavlinkVersion,
24617        __input: &[u8],
24618    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24619        let avail_len = __input.len();
24620        let mut payload_buf = [0; Self::ENCODED_LEN];
24621        let mut buf = if avail_len < Self::ENCODED_LEN {
24622            payload_buf[0..avail_len].copy_from_slice(__input);
24623            Bytes::new(&payload_buf)
24624        } else {
24625            Bytes::new(__input)
24626        };
24627        let mut __struct = Self::default();
24628        __struct.seq = buf.get_u16_le();
24629        Ok(__struct)
24630    }
24631    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24632        let mut __tmp = BytesMut::new(bytes);
24633        #[allow(clippy::absurd_extreme_comparisons)]
24634        #[allow(unused_comparisons)]
24635        if __tmp.remaining() < Self::ENCODED_LEN {
24636            panic!(
24637                "buffer is too small (need {} bytes, but got {})",
24638                Self::ENCODED_LEN,
24639                __tmp.remaining(),
24640            )
24641        }
24642        __tmp.put_u16_le(self.seq);
24643        if matches!(version, MavlinkVersion::V2) {
24644            let len = __tmp.len();
24645            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24646        } else {
24647            __tmp.len()
24648        }
24649    }
24650}
24651#[doc = "id: 121"]
24652#[doc = "Erase all logs."]
24653#[derive(Debug, Clone, PartialEq)]
24654#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24655#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24656pub struct LOG_ERASE_DATA {
24657    #[doc = "System ID"]
24658    pub target_system: u8,
24659    #[doc = "Component ID"]
24660    pub target_component: u8,
24661}
24662impl LOG_ERASE_DATA {
24663    pub const ENCODED_LEN: usize = 2usize;
24664    pub const DEFAULT: Self = Self {
24665        target_system: 0_u8,
24666        target_component: 0_u8,
24667    };
24668    #[cfg(feature = "arbitrary")]
24669    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24670        use arbitrary::{Arbitrary, Unstructured};
24671        let mut buf = [0u8; 1024];
24672        rng.fill_bytes(&mut buf);
24673        let mut unstructured = Unstructured::new(&buf);
24674        Self::arbitrary(&mut unstructured).unwrap_or_default()
24675    }
24676}
24677impl Default for LOG_ERASE_DATA {
24678    fn default() -> Self {
24679        Self::DEFAULT.clone()
24680    }
24681}
24682impl MessageData for LOG_ERASE_DATA {
24683    type Message = MavMessage;
24684    const ID: u32 = 121u32;
24685    const NAME: &'static str = "LOG_ERASE";
24686    const EXTRA_CRC: u8 = 237u8;
24687    const ENCODED_LEN: usize = 2usize;
24688    fn deser(
24689        _version: MavlinkVersion,
24690        __input: &[u8],
24691    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24692        let avail_len = __input.len();
24693        let mut payload_buf = [0; Self::ENCODED_LEN];
24694        let mut buf = if avail_len < Self::ENCODED_LEN {
24695            payload_buf[0..avail_len].copy_from_slice(__input);
24696            Bytes::new(&payload_buf)
24697        } else {
24698            Bytes::new(__input)
24699        };
24700        let mut __struct = Self::default();
24701        __struct.target_system = buf.get_u8();
24702        __struct.target_component = buf.get_u8();
24703        Ok(__struct)
24704    }
24705    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24706        let mut __tmp = BytesMut::new(bytes);
24707        #[allow(clippy::absurd_extreme_comparisons)]
24708        #[allow(unused_comparisons)]
24709        if __tmp.remaining() < Self::ENCODED_LEN {
24710            panic!(
24711                "buffer is too small (need {} bytes, but got {})",
24712                Self::ENCODED_LEN,
24713                __tmp.remaining(),
24714            )
24715        }
24716        __tmp.put_u8(self.target_system);
24717        __tmp.put_u8(self.target_component);
24718        if matches!(version, MavlinkVersion::V2) {
24719            let len = __tmp.len();
24720            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24721        } else {
24722            __tmp.len()
24723        }
24724    }
24725}
24726#[doc = "id: 45"]
24727#[doc = "Delete all mission items at once."]
24728#[derive(Debug, Clone, PartialEq)]
24729#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24730#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24731pub struct MISSION_CLEAR_ALL_DATA {
24732    #[doc = "System ID"]
24733    pub target_system: u8,
24734    #[doc = "Component ID"]
24735    pub target_component: u8,
24736    #[doc = "Mission type."]
24737    #[cfg_attr(feature = "serde", serde(default))]
24738    pub mission_type: MavMissionType,
24739}
24740impl MISSION_CLEAR_ALL_DATA {
24741    pub const ENCODED_LEN: usize = 3usize;
24742    pub const DEFAULT: Self = Self {
24743        target_system: 0_u8,
24744        target_component: 0_u8,
24745        mission_type: MavMissionType::DEFAULT,
24746    };
24747    #[cfg(feature = "arbitrary")]
24748    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24749        use arbitrary::{Arbitrary, Unstructured};
24750        let mut buf = [0u8; 1024];
24751        rng.fill_bytes(&mut buf);
24752        let mut unstructured = Unstructured::new(&buf);
24753        Self::arbitrary(&mut unstructured).unwrap_or_default()
24754    }
24755}
24756impl Default for MISSION_CLEAR_ALL_DATA {
24757    fn default() -> Self {
24758        Self::DEFAULT.clone()
24759    }
24760}
24761impl MessageData for MISSION_CLEAR_ALL_DATA {
24762    type Message = MavMessage;
24763    const ID: u32 = 45u32;
24764    const NAME: &'static str = "MISSION_CLEAR_ALL";
24765    const EXTRA_CRC: u8 = 232u8;
24766    const ENCODED_LEN: usize = 3usize;
24767    fn deser(
24768        _version: MavlinkVersion,
24769        __input: &[u8],
24770    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24771        let avail_len = __input.len();
24772        let mut payload_buf = [0; Self::ENCODED_LEN];
24773        let mut buf = if avail_len < Self::ENCODED_LEN {
24774            payload_buf[0..avail_len].copy_from_slice(__input);
24775            Bytes::new(&payload_buf)
24776        } else {
24777            Bytes::new(__input)
24778        };
24779        let mut __struct = Self::default();
24780        __struct.target_system = buf.get_u8();
24781        __struct.target_component = buf.get_u8();
24782        let tmp = buf.get_u8();
24783        __struct.mission_type =
24784            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24785                enum_type: "MavMissionType",
24786                value: tmp as u32,
24787            })?;
24788        Ok(__struct)
24789    }
24790    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24791        let mut __tmp = BytesMut::new(bytes);
24792        #[allow(clippy::absurd_extreme_comparisons)]
24793        #[allow(unused_comparisons)]
24794        if __tmp.remaining() < Self::ENCODED_LEN {
24795            panic!(
24796                "buffer is too small (need {} bytes, but got {})",
24797                Self::ENCODED_LEN,
24798                __tmp.remaining(),
24799            )
24800        }
24801        __tmp.put_u8(self.target_system);
24802        __tmp.put_u8(self.target_component);
24803        __tmp.put_u8(self.mission_type as u8);
24804        if matches!(version, MavlinkVersion::V2) {
24805            let len = __tmp.len();
24806            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24807        } else {
24808            __tmp.len()
24809        }
24810    }
24811}
24812#[doc = "id: 323"]
24813#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
24814#[derive(Debug, Clone, PartialEq)]
24815#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24816#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24817pub struct PARAM_EXT_SET_DATA {
24818    #[doc = "System ID"]
24819    pub target_system: u8,
24820    #[doc = "Component ID"]
24821    pub target_component: u8,
24822    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24823    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24824    pub param_id: [u8; 16],
24825    #[doc = "Parameter value"]
24826    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24827    pub param_value: [u8; 128],
24828    #[doc = "Parameter type."]
24829    pub param_type: MavParamExtType,
24830}
24831impl PARAM_EXT_SET_DATA {
24832    pub const ENCODED_LEN: usize = 147usize;
24833    pub const DEFAULT: Self = Self {
24834        target_system: 0_u8,
24835        target_component: 0_u8,
24836        param_id: [0_u8; 16usize],
24837        param_value: [0_u8; 128usize],
24838        param_type: MavParamExtType::DEFAULT,
24839    };
24840    #[cfg(feature = "arbitrary")]
24841    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24842        use arbitrary::{Arbitrary, Unstructured};
24843        let mut buf = [0u8; 1024];
24844        rng.fill_bytes(&mut buf);
24845        let mut unstructured = Unstructured::new(&buf);
24846        Self::arbitrary(&mut unstructured).unwrap_or_default()
24847    }
24848}
24849impl Default for PARAM_EXT_SET_DATA {
24850    fn default() -> Self {
24851        Self::DEFAULT.clone()
24852    }
24853}
24854impl MessageData for PARAM_EXT_SET_DATA {
24855    type Message = MavMessage;
24856    const ID: u32 = 323u32;
24857    const NAME: &'static str = "PARAM_EXT_SET";
24858    const EXTRA_CRC: u8 = 78u8;
24859    const ENCODED_LEN: usize = 147usize;
24860    fn deser(
24861        _version: MavlinkVersion,
24862        __input: &[u8],
24863    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24864        let avail_len = __input.len();
24865        let mut payload_buf = [0; Self::ENCODED_LEN];
24866        let mut buf = if avail_len < Self::ENCODED_LEN {
24867            payload_buf[0..avail_len].copy_from_slice(__input);
24868            Bytes::new(&payload_buf)
24869        } else {
24870            Bytes::new(__input)
24871        };
24872        let mut __struct = Self::default();
24873        __struct.target_system = buf.get_u8();
24874        __struct.target_component = buf.get_u8();
24875        for v in &mut __struct.param_id {
24876            let val = buf.get_u8();
24877            *v = val;
24878        }
24879        for v in &mut __struct.param_value {
24880            let val = buf.get_u8();
24881            *v = val;
24882        }
24883        let tmp = buf.get_u8();
24884        __struct.param_type =
24885            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24886                enum_type: "MavParamExtType",
24887                value: tmp as u32,
24888            })?;
24889        Ok(__struct)
24890    }
24891    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24892        let mut __tmp = BytesMut::new(bytes);
24893        #[allow(clippy::absurd_extreme_comparisons)]
24894        #[allow(unused_comparisons)]
24895        if __tmp.remaining() < Self::ENCODED_LEN {
24896            panic!(
24897                "buffer is too small (need {} bytes, but got {})",
24898                Self::ENCODED_LEN,
24899                __tmp.remaining(),
24900            )
24901        }
24902        __tmp.put_u8(self.target_system);
24903        __tmp.put_u8(self.target_component);
24904        for val in &self.param_id {
24905            __tmp.put_u8(*val);
24906        }
24907        for val in &self.param_value {
24908            __tmp.put_u8(*val);
24909        }
24910        __tmp.put_u8(self.param_type as u8);
24911        if matches!(version, MavlinkVersion::V2) {
24912            let len = __tmp.len();
24913            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24914        } else {
24915            __tmp.len()
24916        }
24917    }
24918}
24919#[doc = "id: 143"]
24920#[doc = "Barometer readings for 3rd barometer."]
24921#[derive(Debug, Clone, PartialEq)]
24922#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24923#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24924pub struct SCALED_PRESSURE3_DATA {
24925    #[doc = "Timestamp (time since system boot)."]
24926    pub time_boot_ms: u32,
24927    #[doc = "Absolute pressure"]
24928    pub press_abs: f32,
24929    #[doc = "Differential pressure"]
24930    pub press_diff: f32,
24931    #[doc = "Absolute pressure temperature"]
24932    pub temperature: i16,
24933    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
24934    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24935    pub temperature_press_diff: i16,
24936}
24937impl SCALED_PRESSURE3_DATA {
24938    pub const ENCODED_LEN: usize = 16usize;
24939    pub const DEFAULT: Self = Self {
24940        time_boot_ms: 0_u32,
24941        press_abs: 0.0_f32,
24942        press_diff: 0.0_f32,
24943        temperature: 0_i16,
24944        temperature_press_diff: 0_i16,
24945    };
24946    #[cfg(feature = "arbitrary")]
24947    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24948        use arbitrary::{Arbitrary, Unstructured};
24949        let mut buf = [0u8; 1024];
24950        rng.fill_bytes(&mut buf);
24951        let mut unstructured = Unstructured::new(&buf);
24952        Self::arbitrary(&mut unstructured).unwrap_or_default()
24953    }
24954}
24955impl Default for SCALED_PRESSURE3_DATA {
24956    fn default() -> Self {
24957        Self::DEFAULT.clone()
24958    }
24959}
24960impl MessageData for SCALED_PRESSURE3_DATA {
24961    type Message = MavMessage;
24962    const ID: u32 = 143u32;
24963    const NAME: &'static str = "SCALED_PRESSURE3";
24964    const EXTRA_CRC: u8 = 131u8;
24965    const ENCODED_LEN: usize = 16usize;
24966    fn deser(
24967        _version: MavlinkVersion,
24968        __input: &[u8],
24969    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24970        let avail_len = __input.len();
24971        let mut payload_buf = [0; Self::ENCODED_LEN];
24972        let mut buf = if avail_len < Self::ENCODED_LEN {
24973            payload_buf[0..avail_len].copy_from_slice(__input);
24974            Bytes::new(&payload_buf)
24975        } else {
24976            Bytes::new(__input)
24977        };
24978        let mut __struct = Self::default();
24979        __struct.time_boot_ms = buf.get_u32_le();
24980        __struct.press_abs = buf.get_f32_le();
24981        __struct.press_diff = buf.get_f32_le();
24982        __struct.temperature = buf.get_i16_le();
24983        __struct.temperature_press_diff = buf.get_i16_le();
24984        Ok(__struct)
24985    }
24986    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24987        let mut __tmp = BytesMut::new(bytes);
24988        #[allow(clippy::absurd_extreme_comparisons)]
24989        #[allow(unused_comparisons)]
24990        if __tmp.remaining() < Self::ENCODED_LEN {
24991            panic!(
24992                "buffer is too small (need {} bytes, but got {})",
24993                Self::ENCODED_LEN,
24994                __tmp.remaining(),
24995            )
24996        }
24997        __tmp.put_u32_le(self.time_boot_ms);
24998        __tmp.put_f32_le(self.press_abs);
24999        __tmp.put_f32_le(self.press_diff);
25000        __tmp.put_i16_le(self.temperature);
25001        __tmp.put_i16_le(self.temperature_press_diff);
25002        if matches!(version, MavlinkVersion::V2) {
25003            let len = __tmp.len();
25004            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25005        } else {
25006            __tmp.len()
25007        }
25008    }
25009}
25010#[doc = "id: 133"]
25011#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
25012#[derive(Debug, Clone, PartialEq)]
25013#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25014#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25015pub struct TERRAIN_REQUEST_DATA {
25016    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
25017    pub mask: u64,
25018    #[doc = "Latitude of SW corner of first grid"]
25019    pub lat: i32,
25020    #[doc = "Longitude of SW corner of first grid"]
25021    pub lon: i32,
25022    #[doc = "Grid spacing"]
25023    pub grid_spacing: u16,
25024}
25025impl TERRAIN_REQUEST_DATA {
25026    pub const ENCODED_LEN: usize = 18usize;
25027    pub const DEFAULT: Self = Self {
25028        mask: 0_u64,
25029        lat: 0_i32,
25030        lon: 0_i32,
25031        grid_spacing: 0_u16,
25032    };
25033    #[cfg(feature = "arbitrary")]
25034    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25035        use arbitrary::{Arbitrary, Unstructured};
25036        let mut buf = [0u8; 1024];
25037        rng.fill_bytes(&mut buf);
25038        let mut unstructured = Unstructured::new(&buf);
25039        Self::arbitrary(&mut unstructured).unwrap_or_default()
25040    }
25041}
25042impl Default for TERRAIN_REQUEST_DATA {
25043    fn default() -> Self {
25044        Self::DEFAULT.clone()
25045    }
25046}
25047impl MessageData for TERRAIN_REQUEST_DATA {
25048    type Message = MavMessage;
25049    const ID: u32 = 133u32;
25050    const NAME: &'static str = "TERRAIN_REQUEST";
25051    const EXTRA_CRC: u8 = 6u8;
25052    const ENCODED_LEN: usize = 18usize;
25053    fn deser(
25054        _version: MavlinkVersion,
25055        __input: &[u8],
25056    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25057        let avail_len = __input.len();
25058        let mut payload_buf = [0; Self::ENCODED_LEN];
25059        let mut buf = if avail_len < Self::ENCODED_LEN {
25060            payload_buf[0..avail_len].copy_from_slice(__input);
25061            Bytes::new(&payload_buf)
25062        } else {
25063            Bytes::new(__input)
25064        };
25065        let mut __struct = Self::default();
25066        __struct.mask = buf.get_u64_le();
25067        __struct.lat = buf.get_i32_le();
25068        __struct.lon = buf.get_i32_le();
25069        __struct.grid_spacing = buf.get_u16_le();
25070        Ok(__struct)
25071    }
25072    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25073        let mut __tmp = BytesMut::new(bytes);
25074        #[allow(clippy::absurd_extreme_comparisons)]
25075        #[allow(unused_comparisons)]
25076        if __tmp.remaining() < Self::ENCODED_LEN {
25077            panic!(
25078                "buffer is too small (need {} bytes, but got {})",
25079                Self::ENCODED_LEN,
25080                __tmp.remaining(),
25081            )
25082        }
25083        __tmp.put_u64_le(self.mask);
25084        __tmp.put_i32_le(self.lat);
25085        __tmp.put_i32_le(self.lon);
25086        __tmp.put_u16_le(self.grid_spacing);
25087        if matches!(version, MavlinkVersion::V2) {
25088            let len = __tmp.len();
25089            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25090        } else {
25091            __tmp.len()
25092        }
25093    }
25094}
25095#[doc = "id: 288"]
25096#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
25097#[derive(Debug, Clone, PartialEq)]
25098#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25099#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25100pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
25101    #[doc = "High level gimbal manager flags."]
25102    pub flags: GimbalManagerFlags,
25103    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
25104    pub pitch: f32,
25105    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
25106    pub yaw: f32,
25107    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
25108    pub pitch_rate: f32,
25109    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
25110    pub yaw_rate: f32,
25111    #[doc = "System ID"]
25112    pub target_system: u8,
25113    #[doc = "Component ID"]
25114    pub target_component: u8,
25115    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
25116    pub gimbal_device_id: u8,
25117}
25118impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
25119    pub const ENCODED_LEN: usize = 23usize;
25120    pub const DEFAULT: Self = Self {
25121        flags: GimbalManagerFlags::DEFAULT,
25122        pitch: 0.0_f32,
25123        yaw: 0.0_f32,
25124        pitch_rate: 0.0_f32,
25125        yaw_rate: 0.0_f32,
25126        target_system: 0_u8,
25127        target_component: 0_u8,
25128        gimbal_device_id: 0_u8,
25129    };
25130    #[cfg(feature = "arbitrary")]
25131    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25132        use arbitrary::{Arbitrary, Unstructured};
25133        let mut buf = [0u8; 1024];
25134        rng.fill_bytes(&mut buf);
25135        let mut unstructured = Unstructured::new(&buf);
25136        Self::arbitrary(&mut unstructured).unwrap_or_default()
25137    }
25138}
25139impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
25140    fn default() -> Self {
25141        Self::DEFAULT.clone()
25142    }
25143}
25144impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
25145    type Message = MavMessage;
25146    const ID: u32 = 288u32;
25147    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
25148    const EXTRA_CRC: u8 = 20u8;
25149    const ENCODED_LEN: usize = 23usize;
25150    fn deser(
25151        _version: MavlinkVersion,
25152        __input: &[u8],
25153    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25154        let avail_len = __input.len();
25155        let mut payload_buf = [0; Self::ENCODED_LEN];
25156        let mut buf = if avail_len < Self::ENCODED_LEN {
25157            payload_buf[0..avail_len].copy_from_slice(__input);
25158            Bytes::new(&payload_buf)
25159        } else {
25160            Bytes::new(__input)
25161        };
25162        let mut __struct = Self::default();
25163        let tmp = buf.get_u32_le();
25164        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
25165            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
25166                flag_type: "GimbalManagerFlags",
25167                value: tmp as u32,
25168            })?;
25169        __struct.pitch = buf.get_f32_le();
25170        __struct.yaw = buf.get_f32_le();
25171        __struct.pitch_rate = buf.get_f32_le();
25172        __struct.yaw_rate = buf.get_f32_le();
25173        __struct.target_system = buf.get_u8();
25174        __struct.target_component = buf.get_u8();
25175        __struct.gimbal_device_id = buf.get_u8();
25176        Ok(__struct)
25177    }
25178    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25179        let mut __tmp = BytesMut::new(bytes);
25180        #[allow(clippy::absurd_extreme_comparisons)]
25181        #[allow(unused_comparisons)]
25182        if __tmp.remaining() < Self::ENCODED_LEN {
25183            panic!(
25184                "buffer is too small (need {} bytes, but got {})",
25185                Self::ENCODED_LEN,
25186                __tmp.remaining(),
25187            )
25188        }
25189        __tmp.put_u32_le(self.flags.bits());
25190        __tmp.put_f32_le(self.pitch);
25191        __tmp.put_f32_le(self.yaw);
25192        __tmp.put_f32_le(self.pitch_rate);
25193        __tmp.put_f32_le(self.yaw_rate);
25194        __tmp.put_u8(self.target_system);
25195        __tmp.put_u8(self.target_component);
25196        __tmp.put_u8(self.gimbal_device_id);
25197        if matches!(version, MavlinkVersion::V2) {
25198            let len = __tmp.len();
25199            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25200        } else {
25201            __tmp.len()
25202        }
25203    }
25204}
25205#[doc = "id: 82"]
25206#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
25207#[derive(Debug, Clone, PartialEq)]
25208#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25209#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25210pub struct SET_ATTITUDE_TARGET_DATA {
25211    #[doc = "Timestamp (time since system boot)."]
25212    pub time_boot_ms: u32,
25213    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
25214    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25215    pub q: [f32; 4],
25216    #[doc = "Body roll rate"]
25217    pub body_roll_rate: f32,
25218    #[doc = "Body pitch rate"]
25219    pub body_pitch_rate: f32,
25220    #[doc = "Body yaw rate"]
25221    pub body_yaw_rate: f32,
25222    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
25223    pub thrust: f32,
25224    #[doc = "System ID"]
25225    pub target_system: u8,
25226    #[doc = "Component ID"]
25227    pub target_component: u8,
25228    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
25229    pub type_mask: AttitudeTargetTypemask,
25230    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
25231    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25232    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25233    pub thrust_body: [f32; 3],
25234}
25235impl SET_ATTITUDE_TARGET_DATA {
25236    pub const ENCODED_LEN: usize = 51usize;
25237    pub const DEFAULT: Self = Self {
25238        time_boot_ms: 0_u32,
25239        q: [0.0_f32; 4usize],
25240        body_roll_rate: 0.0_f32,
25241        body_pitch_rate: 0.0_f32,
25242        body_yaw_rate: 0.0_f32,
25243        thrust: 0.0_f32,
25244        target_system: 0_u8,
25245        target_component: 0_u8,
25246        type_mask: AttitudeTargetTypemask::DEFAULT,
25247        thrust_body: [0.0_f32; 3usize],
25248    };
25249    #[cfg(feature = "arbitrary")]
25250    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25251        use arbitrary::{Arbitrary, Unstructured};
25252        let mut buf = [0u8; 1024];
25253        rng.fill_bytes(&mut buf);
25254        let mut unstructured = Unstructured::new(&buf);
25255        Self::arbitrary(&mut unstructured).unwrap_or_default()
25256    }
25257}
25258impl Default for SET_ATTITUDE_TARGET_DATA {
25259    fn default() -> Self {
25260        Self::DEFAULT.clone()
25261    }
25262}
25263impl MessageData for SET_ATTITUDE_TARGET_DATA {
25264    type Message = MavMessage;
25265    const ID: u32 = 82u32;
25266    const NAME: &'static str = "SET_ATTITUDE_TARGET";
25267    const EXTRA_CRC: u8 = 49u8;
25268    const ENCODED_LEN: usize = 51usize;
25269    fn deser(
25270        _version: MavlinkVersion,
25271        __input: &[u8],
25272    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25273        let avail_len = __input.len();
25274        let mut payload_buf = [0; Self::ENCODED_LEN];
25275        let mut buf = if avail_len < Self::ENCODED_LEN {
25276            payload_buf[0..avail_len].copy_from_slice(__input);
25277            Bytes::new(&payload_buf)
25278        } else {
25279            Bytes::new(__input)
25280        };
25281        let mut __struct = Self::default();
25282        __struct.time_boot_ms = buf.get_u32_le();
25283        for v in &mut __struct.q {
25284            let val = buf.get_f32_le();
25285            *v = val;
25286        }
25287        __struct.body_roll_rate = buf.get_f32_le();
25288        __struct.body_pitch_rate = buf.get_f32_le();
25289        __struct.body_yaw_rate = buf.get_f32_le();
25290        __struct.thrust = buf.get_f32_le();
25291        __struct.target_system = buf.get_u8();
25292        __struct.target_component = buf.get_u8();
25293        let tmp = buf.get_u8();
25294        __struct.type_mask = AttitudeTargetTypemask::from_bits(
25295            tmp & AttitudeTargetTypemask::all().bits(),
25296        )
25297        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
25298            flag_type: "AttitudeTargetTypemask",
25299            value: tmp as u32,
25300        })?;
25301        for v in &mut __struct.thrust_body {
25302            let val = buf.get_f32_le();
25303            *v = val;
25304        }
25305        Ok(__struct)
25306    }
25307    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25308        let mut __tmp = BytesMut::new(bytes);
25309        #[allow(clippy::absurd_extreme_comparisons)]
25310        #[allow(unused_comparisons)]
25311        if __tmp.remaining() < Self::ENCODED_LEN {
25312            panic!(
25313                "buffer is too small (need {} bytes, but got {})",
25314                Self::ENCODED_LEN,
25315                __tmp.remaining(),
25316            )
25317        }
25318        __tmp.put_u32_le(self.time_boot_ms);
25319        for val in &self.q {
25320            __tmp.put_f32_le(*val);
25321        }
25322        __tmp.put_f32_le(self.body_roll_rate);
25323        __tmp.put_f32_le(self.body_pitch_rate);
25324        __tmp.put_f32_le(self.body_yaw_rate);
25325        __tmp.put_f32_le(self.thrust);
25326        __tmp.put_u8(self.target_system);
25327        __tmp.put_u8(self.target_component);
25328        __tmp.put_u8(self.type_mask.bits());
25329        for val in &self.thrust_body {
25330            __tmp.put_f32_le(*val);
25331        }
25332        if matches!(version, MavlinkVersion::V2) {
25333            let len = __tmp.len();
25334            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25335        } else {
25336            __tmp.len()
25337        }
25338    }
25339}
25340#[doc = "id: 106"]
25341#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
25342#[derive(Debug, Clone, PartialEq)]
25343#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25344#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25345pub struct OPTICAL_FLOW_RAD_DATA {
25346    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25347    pub time_usec: u64,
25348    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
25349    pub integration_time_us: u32,
25350    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
25351    pub integrated_x: f32,
25352    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
25353    pub integrated_y: f32,
25354    #[doc = "RH rotation around X axis"]
25355    pub integrated_xgyro: f32,
25356    #[doc = "RH rotation around Y axis"]
25357    pub integrated_ygyro: f32,
25358    #[doc = "RH rotation around Z axis"]
25359    pub integrated_zgyro: f32,
25360    #[doc = "Time since the distance was sampled."]
25361    pub time_delta_distance_us: u32,
25362    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
25363    pub distance: f32,
25364    #[doc = "Temperature"]
25365    pub temperature: i16,
25366    #[doc = "Sensor ID"]
25367    pub sensor_id: u8,
25368    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
25369    pub quality: u8,
25370}
25371impl OPTICAL_FLOW_RAD_DATA {
25372    pub const ENCODED_LEN: usize = 44usize;
25373    pub const DEFAULT: Self = Self {
25374        time_usec: 0_u64,
25375        integration_time_us: 0_u32,
25376        integrated_x: 0.0_f32,
25377        integrated_y: 0.0_f32,
25378        integrated_xgyro: 0.0_f32,
25379        integrated_ygyro: 0.0_f32,
25380        integrated_zgyro: 0.0_f32,
25381        time_delta_distance_us: 0_u32,
25382        distance: 0.0_f32,
25383        temperature: 0_i16,
25384        sensor_id: 0_u8,
25385        quality: 0_u8,
25386    };
25387    #[cfg(feature = "arbitrary")]
25388    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25389        use arbitrary::{Arbitrary, Unstructured};
25390        let mut buf = [0u8; 1024];
25391        rng.fill_bytes(&mut buf);
25392        let mut unstructured = Unstructured::new(&buf);
25393        Self::arbitrary(&mut unstructured).unwrap_or_default()
25394    }
25395}
25396impl Default for OPTICAL_FLOW_RAD_DATA {
25397    fn default() -> Self {
25398        Self::DEFAULT.clone()
25399    }
25400}
25401impl MessageData for OPTICAL_FLOW_RAD_DATA {
25402    type Message = MavMessage;
25403    const ID: u32 = 106u32;
25404    const NAME: &'static str = "OPTICAL_FLOW_RAD";
25405    const EXTRA_CRC: u8 = 138u8;
25406    const ENCODED_LEN: usize = 44usize;
25407    fn deser(
25408        _version: MavlinkVersion,
25409        __input: &[u8],
25410    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25411        let avail_len = __input.len();
25412        let mut payload_buf = [0; Self::ENCODED_LEN];
25413        let mut buf = if avail_len < Self::ENCODED_LEN {
25414            payload_buf[0..avail_len].copy_from_slice(__input);
25415            Bytes::new(&payload_buf)
25416        } else {
25417            Bytes::new(__input)
25418        };
25419        let mut __struct = Self::default();
25420        __struct.time_usec = buf.get_u64_le();
25421        __struct.integration_time_us = buf.get_u32_le();
25422        __struct.integrated_x = buf.get_f32_le();
25423        __struct.integrated_y = buf.get_f32_le();
25424        __struct.integrated_xgyro = buf.get_f32_le();
25425        __struct.integrated_ygyro = buf.get_f32_le();
25426        __struct.integrated_zgyro = buf.get_f32_le();
25427        __struct.time_delta_distance_us = buf.get_u32_le();
25428        __struct.distance = buf.get_f32_le();
25429        __struct.temperature = buf.get_i16_le();
25430        __struct.sensor_id = buf.get_u8();
25431        __struct.quality = buf.get_u8();
25432        Ok(__struct)
25433    }
25434    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25435        let mut __tmp = BytesMut::new(bytes);
25436        #[allow(clippy::absurd_extreme_comparisons)]
25437        #[allow(unused_comparisons)]
25438        if __tmp.remaining() < Self::ENCODED_LEN {
25439            panic!(
25440                "buffer is too small (need {} bytes, but got {})",
25441                Self::ENCODED_LEN,
25442                __tmp.remaining(),
25443            )
25444        }
25445        __tmp.put_u64_le(self.time_usec);
25446        __tmp.put_u32_le(self.integration_time_us);
25447        __tmp.put_f32_le(self.integrated_x);
25448        __tmp.put_f32_le(self.integrated_y);
25449        __tmp.put_f32_le(self.integrated_xgyro);
25450        __tmp.put_f32_le(self.integrated_ygyro);
25451        __tmp.put_f32_le(self.integrated_zgyro);
25452        __tmp.put_u32_le(self.time_delta_distance_us);
25453        __tmp.put_f32_le(self.distance);
25454        __tmp.put_i16_le(self.temperature);
25455        __tmp.put_u8(self.sensor_id);
25456        __tmp.put_u8(self.quality);
25457        if matches!(version, MavlinkVersion::V2) {
25458            let len = __tmp.len();
25459            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25460        } else {
25461            __tmp.len()
25462        }
25463    }
25464}
25465#[doc = "id: 43"]
25466#[doc = "Request the overall list of mission items from the system/component."]
25467#[derive(Debug, Clone, PartialEq)]
25468#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25469#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25470pub struct MISSION_REQUEST_LIST_DATA {
25471    #[doc = "System ID"]
25472    pub target_system: u8,
25473    #[doc = "Component ID"]
25474    pub target_component: u8,
25475    #[doc = "Mission type."]
25476    #[cfg_attr(feature = "serde", serde(default))]
25477    pub mission_type: MavMissionType,
25478}
25479impl MISSION_REQUEST_LIST_DATA {
25480    pub const ENCODED_LEN: usize = 3usize;
25481    pub const DEFAULT: Self = Self {
25482        target_system: 0_u8,
25483        target_component: 0_u8,
25484        mission_type: MavMissionType::DEFAULT,
25485    };
25486    #[cfg(feature = "arbitrary")]
25487    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25488        use arbitrary::{Arbitrary, Unstructured};
25489        let mut buf = [0u8; 1024];
25490        rng.fill_bytes(&mut buf);
25491        let mut unstructured = Unstructured::new(&buf);
25492        Self::arbitrary(&mut unstructured).unwrap_or_default()
25493    }
25494}
25495impl Default for MISSION_REQUEST_LIST_DATA {
25496    fn default() -> Self {
25497        Self::DEFAULT.clone()
25498    }
25499}
25500impl MessageData for MISSION_REQUEST_LIST_DATA {
25501    type Message = MavMessage;
25502    const ID: u32 = 43u32;
25503    const NAME: &'static str = "MISSION_REQUEST_LIST";
25504    const EXTRA_CRC: u8 = 132u8;
25505    const ENCODED_LEN: usize = 3usize;
25506    fn deser(
25507        _version: MavlinkVersion,
25508        __input: &[u8],
25509    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25510        let avail_len = __input.len();
25511        let mut payload_buf = [0; Self::ENCODED_LEN];
25512        let mut buf = if avail_len < Self::ENCODED_LEN {
25513            payload_buf[0..avail_len].copy_from_slice(__input);
25514            Bytes::new(&payload_buf)
25515        } else {
25516            Bytes::new(__input)
25517        };
25518        let mut __struct = Self::default();
25519        __struct.target_system = buf.get_u8();
25520        __struct.target_component = buf.get_u8();
25521        let tmp = buf.get_u8();
25522        __struct.mission_type =
25523            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25524                enum_type: "MavMissionType",
25525                value: tmp as u32,
25526            })?;
25527        Ok(__struct)
25528    }
25529    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25530        let mut __tmp = BytesMut::new(bytes);
25531        #[allow(clippy::absurd_extreme_comparisons)]
25532        #[allow(unused_comparisons)]
25533        if __tmp.remaining() < Self::ENCODED_LEN {
25534            panic!(
25535                "buffer is too small (need {} bytes, but got {})",
25536                Self::ENCODED_LEN,
25537                __tmp.remaining(),
25538            )
25539        }
25540        __tmp.put_u8(self.target_system);
25541        __tmp.put_u8(self.target_component);
25542        __tmp.put_u8(self.mission_type as u8);
25543        if matches!(version, MavlinkVersion::V2) {
25544            let len = __tmp.len();
25545            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25546        } else {
25547            __tmp.len()
25548        }
25549    }
25550}
25551#[doc = "id: 115"]
25552#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
25553#[derive(Debug, Clone, PartialEq)]
25554#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25555#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25556pub struct HIL_STATE_QUATERNION_DATA {
25557    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25558    pub time_usec: u64,
25559    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
25560    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25561    pub attitude_quaternion: [f32; 4],
25562    #[doc = "Body frame roll / phi angular speed"]
25563    pub rollspeed: f32,
25564    #[doc = "Body frame pitch / theta angular speed"]
25565    pub pitchspeed: f32,
25566    #[doc = "Body frame yaw / psi angular speed"]
25567    pub yawspeed: f32,
25568    #[doc = "Latitude"]
25569    pub lat: i32,
25570    #[doc = "Longitude"]
25571    pub lon: i32,
25572    #[doc = "Altitude"]
25573    pub alt: i32,
25574    #[doc = "Ground X Speed (Latitude)"]
25575    pub vx: i16,
25576    #[doc = "Ground Y Speed (Longitude)"]
25577    pub vy: i16,
25578    #[doc = "Ground Z Speed (Altitude)"]
25579    pub vz: i16,
25580    #[doc = "Indicated airspeed"]
25581    pub ind_airspeed: u16,
25582    #[doc = "True airspeed"]
25583    pub true_airspeed: u16,
25584    #[doc = "X acceleration"]
25585    pub xacc: i16,
25586    #[doc = "Y acceleration"]
25587    pub yacc: i16,
25588    #[doc = "Z acceleration"]
25589    pub zacc: i16,
25590}
25591impl HIL_STATE_QUATERNION_DATA {
25592    pub const ENCODED_LEN: usize = 64usize;
25593    pub const DEFAULT: Self = Self {
25594        time_usec: 0_u64,
25595        attitude_quaternion: [0.0_f32; 4usize],
25596        rollspeed: 0.0_f32,
25597        pitchspeed: 0.0_f32,
25598        yawspeed: 0.0_f32,
25599        lat: 0_i32,
25600        lon: 0_i32,
25601        alt: 0_i32,
25602        vx: 0_i16,
25603        vy: 0_i16,
25604        vz: 0_i16,
25605        ind_airspeed: 0_u16,
25606        true_airspeed: 0_u16,
25607        xacc: 0_i16,
25608        yacc: 0_i16,
25609        zacc: 0_i16,
25610    };
25611    #[cfg(feature = "arbitrary")]
25612    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25613        use arbitrary::{Arbitrary, Unstructured};
25614        let mut buf = [0u8; 1024];
25615        rng.fill_bytes(&mut buf);
25616        let mut unstructured = Unstructured::new(&buf);
25617        Self::arbitrary(&mut unstructured).unwrap_or_default()
25618    }
25619}
25620impl Default for HIL_STATE_QUATERNION_DATA {
25621    fn default() -> Self {
25622        Self::DEFAULT.clone()
25623    }
25624}
25625impl MessageData for HIL_STATE_QUATERNION_DATA {
25626    type Message = MavMessage;
25627    const ID: u32 = 115u32;
25628    const NAME: &'static str = "HIL_STATE_QUATERNION";
25629    const EXTRA_CRC: u8 = 4u8;
25630    const ENCODED_LEN: usize = 64usize;
25631    fn deser(
25632        _version: MavlinkVersion,
25633        __input: &[u8],
25634    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25635        let avail_len = __input.len();
25636        let mut payload_buf = [0; Self::ENCODED_LEN];
25637        let mut buf = if avail_len < Self::ENCODED_LEN {
25638            payload_buf[0..avail_len].copy_from_slice(__input);
25639            Bytes::new(&payload_buf)
25640        } else {
25641            Bytes::new(__input)
25642        };
25643        let mut __struct = Self::default();
25644        __struct.time_usec = buf.get_u64_le();
25645        for v in &mut __struct.attitude_quaternion {
25646            let val = buf.get_f32_le();
25647            *v = val;
25648        }
25649        __struct.rollspeed = buf.get_f32_le();
25650        __struct.pitchspeed = buf.get_f32_le();
25651        __struct.yawspeed = buf.get_f32_le();
25652        __struct.lat = buf.get_i32_le();
25653        __struct.lon = buf.get_i32_le();
25654        __struct.alt = buf.get_i32_le();
25655        __struct.vx = buf.get_i16_le();
25656        __struct.vy = buf.get_i16_le();
25657        __struct.vz = buf.get_i16_le();
25658        __struct.ind_airspeed = buf.get_u16_le();
25659        __struct.true_airspeed = buf.get_u16_le();
25660        __struct.xacc = buf.get_i16_le();
25661        __struct.yacc = buf.get_i16_le();
25662        __struct.zacc = buf.get_i16_le();
25663        Ok(__struct)
25664    }
25665    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25666        let mut __tmp = BytesMut::new(bytes);
25667        #[allow(clippy::absurd_extreme_comparisons)]
25668        #[allow(unused_comparisons)]
25669        if __tmp.remaining() < Self::ENCODED_LEN {
25670            panic!(
25671                "buffer is too small (need {} bytes, but got {})",
25672                Self::ENCODED_LEN,
25673                __tmp.remaining(),
25674            )
25675        }
25676        __tmp.put_u64_le(self.time_usec);
25677        for val in &self.attitude_quaternion {
25678            __tmp.put_f32_le(*val);
25679        }
25680        __tmp.put_f32_le(self.rollspeed);
25681        __tmp.put_f32_le(self.pitchspeed);
25682        __tmp.put_f32_le(self.yawspeed);
25683        __tmp.put_i32_le(self.lat);
25684        __tmp.put_i32_le(self.lon);
25685        __tmp.put_i32_le(self.alt);
25686        __tmp.put_i16_le(self.vx);
25687        __tmp.put_i16_le(self.vy);
25688        __tmp.put_i16_le(self.vz);
25689        __tmp.put_u16_le(self.ind_airspeed);
25690        __tmp.put_u16_le(self.true_airspeed);
25691        __tmp.put_i16_le(self.xacc);
25692        __tmp.put_i16_le(self.yacc);
25693        __tmp.put_i16_le(self.zacc);
25694        if matches!(version, MavlinkVersion::V2) {
25695            let len = __tmp.len();
25696            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25697        } else {
25698            __tmp.len()
25699        }
25700    }
25701}
25702#[doc = "id: 77"]
25703#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
25704#[derive(Debug, Clone, PartialEq)]
25705#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25706#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25707pub struct COMMAND_ACK_DATA {
25708    #[doc = "Command ID (of acknowledged command)."]
25709    pub command: MavCmd,
25710    #[doc = "Result of command."]
25711    pub result: MavResult,
25712    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
25713    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25714    pub progress: u8,
25715    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
25716    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25717    pub result_param2: i32,
25718    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
25719    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25720    pub target_system: u8,
25721    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
25722    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25723    pub target_component: u8,
25724}
25725impl COMMAND_ACK_DATA {
25726    pub const ENCODED_LEN: usize = 10usize;
25727    pub const DEFAULT: Self = Self {
25728        command: MavCmd::DEFAULT,
25729        result: MavResult::DEFAULT,
25730        progress: 0_u8,
25731        result_param2: 0_i32,
25732        target_system: 0_u8,
25733        target_component: 0_u8,
25734    };
25735    #[cfg(feature = "arbitrary")]
25736    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25737        use arbitrary::{Arbitrary, Unstructured};
25738        let mut buf = [0u8; 1024];
25739        rng.fill_bytes(&mut buf);
25740        let mut unstructured = Unstructured::new(&buf);
25741        Self::arbitrary(&mut unstructured).unwrap_or_default()
25742    }
25743}
25744impl Default for COMMAND_ACK_DATA {
25745    fn default() -> Self {
25746        Self::DEFAULT.clone()
25747    }
25748}
25749impl MessageData for COMMAND_ACK_DATA {
25750    type Message = MavMessage;
25751    const ID: u32 = 77u32;
25752    const NAME: &'static str = "COMMAND_ACK";
25753    const EXTRA_CRC: u8 = 143u8;
25754    const ENCODED_LEN: usize = 10usize;
25755    fn deser(
25756        _version: MavlinkVersion,
25757        __input: &[u8],
25758    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25759        let avail_len = __input.len();
25760        let mut payload_buf = [0; Self::ENCODED_LEN];
25761        let mut buf = if avail_len < Self::ENCODED_LEN {
25762            payload_buf[0..avail_len].copy_from_slice(__input);
25763            Bytes::new(&payload_buf)
25764        } else {
25765            Bytes::new(__input)
25766        };
25767        let mut __struct = Self::default();
25768        let tmp = buf.get_u16_le();
25769        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
25770            ::mavlink_core::error::ParserError::InvalidEnum {
25771                enum_type: "MavCmd",
25772                value: tmp as u32,
25773            },
25774        )?;
25775        let tmp = buf.get_u8();
25776        __struct.result =
25777            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25778                enum_type: "MavResult",
25779                value: tmp as u32,
25780            })?;
25781        __struct.progress = buf.get_u8();
25782        __struct.result_param2 = buf.get_i32_le();
25783        __struct.target_system = buf.get_u8();
25784        __struct.target_component = buf.get_u8();
25785        Ok(__struct)
25786    }
25787    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25788        let mut __tmp = BytesMut::new(bytes);
25789        #[allow(clippy::absurd_extreme_comparisons)]
25790        #[allow(unused_comparisons)]
25791        if __tmp.remaining() < Self::ENCODED_LEN {
25792            panic!(
25793                "buffer is too small (need {} bytes, but got {})",
25794                Self::ENCODED_LEN,
25795                __tmp.remaining(),
25796            )
25797        }
25798        __tmp.put_u16_le(self.command as u16);
25799        __tmp.put_u8(self.result as u8);
25800        __tmp.put_u8(self.progress);
25801        __tmp.put_i32_le(self.result_param2);
25802        __tmp.put_u8(self.target_system);
25803        __tmp.put_u8(self.target_component);
25804        if matches!(version, MavlinkVersion::V2) {
25805            let len = __tmp.len();
25806            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25807        } else {
25808            __tmp.len()
25809        }
25810    }
25811}
25812#[doc = "id: 257"]
25813#[doc = "Report button state change."]
25814#[derive(Debug, Clone, PartialEq)]
25815#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25816#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25817pub struct BUTTON_CHANGE_DATA {
25818    #[doc = "Timestamp (time since system boot)."]
25819    pub time_boot_ms: u32,
25820    #[doc = "Time of last change of button state."]
25821    pub last_change_ms: u32,
25822    #[doc = "Bitmap for state of buttons."]
25823    pub state: u8,
25824}
25825impl BUTTON_CHANGE_DATA {
25826    pub const ENCODED_LEN: usize = 9usize;
25827    pub const DEFAULT: Self = Self {
25828        time_boot_ms: 0_u32,
25829        last_change_ms: 0_u32,
25830        state: 0_u8,
25831    };
25832    #[cfg(feature = "arbitrary")]
25833    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25834        use arbitrary::{Arbitrary, Unstructured};
25835        let mut buf = [0u8; 1024];
25836        rng.fill_bytes(&mut buf);
25837        let mut unstructured = Unstructured::new(&buf);
25838        Self::arbitrary(&mut unstructured).unwrap_or_default()
25839    }
25840}
25841impl Default for BUTTON_CHANGE_DATA {
25842    fn default() -> Self {
25843        Self::DEFAULT.clone()
25844    }
25845}
25846impl MessageData for BUTTON_CHANGE_DATA {
25847    type Message = MavMessage;
25848    const ID: u32 = 257u32;
25849    const NAME: &'static str = "BUTTON_CHANGE";
25850    const EXTRA_CRC: u8 = 131u8;
25851    const ENCODED_LEN: usize = 9usize;
25852    fn deser(
25853        _version: MavlinkVersion,
25854        __input: &[u8],
25855    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25856        let avail_len = __input.len();
25857        let mut payload_buf = [0; Self::ENCODED_LEN];
25858        let mut buf = if avail_len < Self::ENCODED_LEN {
25859            payload_buf[0..avail_len].copy_from_slice(__input);
25860            Bytes::new(&payload_buf)
25861        } else {
25862            Bytes::new(__input)
25863        };
25864        let mut __struct = Self::default();
25865        __struct.time_boot_ms = buf.get_u32_le();
25866        __struct.last_change_ms = buf.get_u32_le();
25867        __struct.state = buf.get_u8();
25868        Ok(__struct)
25869    }
25870    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25871        let mut __tmp = BytesMut::new(bytes);
25872        #[allow(clippy::absurd_extreme_comparisons)]
25873        #[allow(unused_comparisons)]
25874        if __tmp.remaining() < Self::ENCODED_LEN {
25875            panic!(
25876                "buffer is too small (need {} bytes, but got {})",
25877                Self::ENCODED_LEN,
25878                __tmp.remaining(),
25879            )
25880        }
25881        __tmp.put_u32_le(self.time_boot_ms);
25882        __tmp.put_u32_le(self.last_change_ms);
25883        __tmp.put_u8(self.state);
25884        if matches!(version, MavlinkVersion::V2) {
25885            let len = __tmp.len();
25886            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25887        } else {
25888            __tmp.len()
25889        }
25890    }
25891}
25892#[doc = "id: 373"]
25893#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
25894#[derive(Debug, Clone, PartialEq)]
25895#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25896#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25897pub struct GENERATOR_STATUS_DATA {
25898    #[doc = "Status flags."]
25899    pub status: MavGeneratorStatusFlag,
25900    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
25901    pub battery_current: f32,
25902    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
25903    pub load_current: f32,
25904    #[doc = "The power being generated. NaN: field not provided"]
25905    pub power_generated: f32,
25906    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
25907    pub bus_voltage: f32,
25908    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
25909    pub bat_current_setpoint: f32,
25910    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
25911    pub runtime: u32,
25912    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
25913    pub time_until_maintenance: i32,
25914    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
25915    pub generator_speed: u16,
25916    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
25917    pub rectifier_temperature: i16,
25918    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
25919    pub generator_temperature: i16,
25920}
25921impl GENERATOR_STATUS_DATA {
25922    pub const ENCODED_LEN: usize = 42usize;
25923    pub const DEFAULT: Self = Self {
25924        status: MavGeneratorStatusFlag::DEFAULT,
25925        battery_current: 0.0_f32,
25926        load_current: 0.0_f32,
25927        power_generated: 0.0_f32,
25928        bus_voltage: 0.0_f32,
25929        bat_current_setpoint: 0.0_f32,
25930        runtime: 0_u32,
25931        time_until_maintenance: 0_i32,
25932        generator_speed: 0_u16,
25933        rectifier_temperature: 0_i16,
25934        generator_temperature: 0_i16,
25935    };
25936    #[cfg(feature = "arbitrary")]
25937    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25938        use arbitrary::{Arbitrary, Unstructured};
25939        let mut buf = [0u8; 1024];
25940        rng.fill_bytes(&mut buf);
25941        let mut unstructured = Unstructured::new(&buf);
25942        Self::arbitrary(&mut unstructured).unwrap_or_default()
25943    }
25944}
25945impl Default for GENERATOR_STATUS_DATA {
25946    fn default() -> Self {
25947        Self::DEFAULT.clone()
25948    }
25949}
25950impl MessageData for GENERATOR_STATUS_DATA {
25951    type Message = MavMessage;
25952    const ID: u32 = 373u32;
25953    const NAME: &'static str = "GENERATOR_STATUS";
25954    const EXTRA_CRC: u8 = 117u8;
25955    const ENCODED_LEN: usize = 42usize;
25956    fn deser(
25957        _version: MavlinkVersion,
25958        __input: &[u8],
25959    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25960        let avail_len = __input.len();
25961        let mut payload_buf = [0; Self::ENCODED_LEN];
25962        let mut buf = if avail_len < Self::ENCODED_LEN {
25963            payload_buf[0..avail_len].copy_from_slice(__input);
25964            Bytes::new(&payload_buf)
25965        } else {
25966            Bytes::new(__input)
25967        };
25968        let mut __struct = Self::default();
25969        let tmp = buf.get_u64_le();
25970        __struct.status = MavGeneratorStatusFlag::from_bits(
25971            tmp & MavGeneratorStatusFlag::all().bits(),
25972        )
25973        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
25974            flag_type: "MavGeneratorStatusFlag",
25975            value: tmp as u32,
25976        })?;
25977        __struct.battery_current = buf.get_f32_le();
25978        __struct.load_current = buf.get_f32_le();
25979        __struct.power_generated = buf.get_f32_le();
25980        __struct.bus_voltage = buf.get_f32_le();
25981        __struct.bat_current_setpoint = buf.get_f32_le();
25982        __struct.runtime = buf.get_u32_le();
25983        __struct.time_until_maintenance = buf.get_i32_le();
25984        __struct.generator_speed = buf.get_u16_le();
25985        __struct.rectifier_temperature = buf.get_i16_le();
25986        __struct.generator_temperature = buf.get_i16_le();
25987        Ok(__struct)
25988    }
25989    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25990        let mut __tmp = BytesMut::new(bytes);
25991        #[allow(clippy::absurd_extreme_comparisons)]
25992        #[allow(unused_comparisons)]
25993        if __tmp.remaining() < Self::ENCODED_LEN {
25994            panic!(
25995                "buffer is too small (need {} bytes, but got {})",
25996                Self::ENCODED_LEN,
25997                __tmp.remaining(),
25998            )
25999        }
26000        __tmp.put_u64_le(self.status.bits());
26001        __tmp.put_f32_le(self.battery_current);
26002        __tmp.put_f32_le(self.load_current);
26003        __tmp.put_f32_le(self.power_generated);
26004        __tmp.put_f32_le(self.bus_voltage);
26005        __tmp.put_f32_le(self.bat_current_setpoint);
26006        __tmp.put_u32_le(self.runtime);
26007        __tmp.put_i32_le(self.time_until_maintenance);
26008        __tmp.put_u16_le(self.generator_speed);
26009        __tmp.put_i16_le(self.rectifier_temperature);
26010        __tmp.put_i16_le(self.generator_temperature);
26011        if matches!(version, MavlinkVersion::V2) {
26012            let len = __tmp.len();
26013            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26014        } else {
26015            __tmp.len()
26016        }
26017    }
26018}
26019#[doc = "id: 265"]
26020#[doc = "Orientation of a mount."]
26021#[derive(Debug, Clone, PartialEq)]
26022#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26023#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26024pub struct MOUNT_ORIENTATION_DATA {
26025    #[doc = "Timestamp (time since system boot)."]
26026    pub time_boot_ms: u32,
26027    #[doc = "Roll in global frame (set to NaN for invalid)."]
26028    pub roll: f32,
26029    #[doc = "Pitch in global frame (set to NaN for invalid)."]
26030    pub pitch: f32,
26031    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
26032    pub yaw: f32,
26033    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
26034    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26035    pub yaw_absolute: f32,
26036}
26037impl MOUNT_ORIENTATION_DATA {
26038    pub const ENCODED_LEN: usize = 20usize;
26039    pub const DEFAULT: Self = Self {
26040        time_boot_ms: 0_u32,
26041        roll: 0.0_f32,
26042        pitch: 0.0_f32,
26043        yaw: 0.0_f32,
26044        yaw_absolute: 0.0_f32,
26045    };
26046    #[cfg(feature = "arbitrary")]
26047    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26048        use arbitrary::{Arbitrary, Unstructured};
26049        let mut buf = [0u8; 1024];
26050        rng.fill_bytes(&mut buf);
26051        let mut unstructured = Unstructured::new(&buf);
26052        Self::arbitrary(&mut unstructured).unwrap_or_default()
26053    }
26054}
26055impl Default for MOUNT_ORIENTATION_DATA {
26056    fn default() -> Self {
26057        Self::DEFAULT.clone()
26058    }
26059}
26060impl MessageData for MOUNT_ORIENTATION_DATA {
26061    type Message = MavMessage;
26062    const ID: u32 = 265u32;
26063    const NAME: &'static str = "MOUNT_ORIENTATION";
26064    const EXTRA_CRC: u8 = 26u8;
26065    const ENCODED_LEN: usize = 20usize;
26066    fn deser(
26067        _version: MavlinkVersion,
26068        __input: &[u8],
26069    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26070        let avail_len = __input.len();
26071        let mut payload_buf = [0; Self::ENCODED_LEN];
26072        let mut buf = if avail_len < Self::ENCODED_LEN {
26073            payload_buf[0..avail_len].copy_from_slice(__input);
26074            Bytes::new(&payload_buf)
26075        } else {
26076            Bytes::new(__input)
26077        };
26078        let mut __struct = Self::default();
26079        __struct.time_boot_ms = buf.get_u32_le();
26080        __struct.roll = buf.get_f32_le();
26081        __struct.pitch = buf.get_f32_le();
26082        __struct.yaw = buf.get_f32_le();
26083        __struct.yaw_absolute = buf.get_f32_le();
26084        Ok(__struct)
26085    }
26086    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26087        let mut __tmp = BytesMut::new(bytes);
26088        #[allow(clippy::absurd_extreme_comparisons)]
26089        #[allow(unused_comparisons)]
26090        if __tmp.remaining() < Self::ENCODED_LEN {
26091            panic!(
26092                "buffer is too small (need {} bytes, but got {})",
26093                Self::ENCODED_LEN,
26094                __tmp.remaining(),
26095            )
26096        }
26097        __tmp.put_u32_le(self.time_boot_ms);
26098        __tmp.put_f32_le(self.roll);
26099        __tmp.put_f32_le(self.pitch);
26100        __tmp.put_f32_le(self.yaw);
26101        __tmp.put_f32_le(self.yaw_absolute);
26102        if matches!(version, MavlinkVersion::V2) {
26103            let len = __tmp.len();
26104            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26105        } else {
26106            __tmp.len()
26107        }
26108    }
26109}
26110#[doc = "id: 12918"]
26111#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
26112#[derive(Debug, Clone, PartialEq)]
26113#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26114#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26115pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
26116    #[doc = "Status level indicating if arming is allowed."]
26117    pub status: MavOdidArmStatus,
26118    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
26119    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26120    pub error: [u8; 50],
26121}
26122impl OPEN_DRONE_ID_ARM_STATUS_DATA {
26123    pub const ENCODED_LEN: usize = 51usize;
26124    pub const DEFAULT: Self = Self {
26125        status: MavOdidArmStatus::DEFAULT,
26126        error: [0_u8; 50usize],
26127    };
26128    #[cfg(feature = "arbitrary")]
26129    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26130        use arbitrary::{Arbitrary, Unstructured};
26131        let mut buf = [0u8; 1024];
26132        rng.fill_bytes(&mut buf);
26133        let mut unstructured = Unstructured::new(&buf);
26134        Self::arbitrary(&mut unstructured).unwrap_or_default()
26135    }
26136}
26137impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
26138    fn default() -> Self {
26139        Self::DEFAULT.clone()
26140    }
26141}
26142impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
26143    type Message = MavMessage;
26144    const ID: u32 = 12918u32;
26145    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
26146    const EXTRA_CRC: u8 = 139u8;
26147    const ENCODED_LEN: usize = 51usize;
26148    fn deser(
26149        _version: MavlinkVersion,
26150        __input: &[u8],
26151    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26152        let avail_len = __input.len();
26153        let mut payload_buf = [0; Self::ENCODED_LEN];
26154        let mut buf = if avail_len < Self::ENCODED_LEN {
26155            payload_buf[0..avail_len].copy_from_slice(__input);
26156            Bytes::new(&payload_buf)
26157        } else {
26158            Bytes::new(__input)
26159        };
26160        let mut __struct = Self::default();
26161        let tmp = buf.get_u8();
26162        __struct.status =
26163            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26164                enum_type: "MavOdidArmStatus",
26165                value: tmp as u32,
26166            })?;
26167        for v in &mut __struct.error {
26168            let val = buf.get_u8();
26169            *v = val;
26170        }
26171        Ok(__struct)
26172    }
26173    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26174        let mut __tmp = BytesMut::new(bytes);
26175        #[allow(clippy::absurd_extreme_comparisons)]
26176        #[allow(unused_comparisons)]
26177        if __tmp.remaining() < Self::ENCODED_LEN {
26178            panic!(
26179                "buffer is too small (need {} bytes, but got {})",
26180                Self::ENCODED_LEN,
26181                __tmp.remaining(),
26182            )
26183        }
26184        __tmp.put_u8(self.status as u8);
26185        for val in &self.error {
26186            __tmp.put_u8(*val);
26187        }
26188        if matches!(version, MavlinkVersion::V2) {
26189            let len = __tmp.len();
26190            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26191        } else {
26192            __tmp.len()
26193        }
26194    }
26195}
26196#[doc = "id: 55"]
26197#[doc = "Read out the safety zone the MAV currently assumes."]
26198#[derive(Debug, Clone, PartialEq)]
26199#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26200#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26201pub struct SAFETY_ALLOWED_AREA_DATA {
26202    #[doc = "x position 1 / Latitude 1"]
26203    pub p1x: f32,
26204    #[doc = "y position 1 / Longitude 1"]
26205    pub p1y: f32,
26206    #[doc = "z position 1 / Altitude 1"]
26207    pub p1z: f32,
26208    #[doc = "x position 2 / Latitude 2"]
26209    pub p2x: f32,
26210    #[doc = "y position 2 / Longitude 2"]
26211    pub p2y: f32,
26212    #[doc = "z position 2 / Altitude 2"]
26213    pub p2z: f32,
26214    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26215    pub frame: MavFrame,
26216}
26217impl SAFETY_ALLOWED_AREA_DATA {
26218    pub const ENCODED_LEN: usize = 25usize;
26219    pub const DEFAULT: Self = Self {
26220        p1x: 0.0_f32,
26221        p1y: 0.0_f32,
26222        p1z: 0.0_f32,
26223        p2x: 0.0_f32,
26224        p2y: 0.0_f32,
26225        p2z: 0.0_f32,
26226        frame: MavFrame::DEFAULT,
26227    };
26228    #[cfg(feature = "arbitrary")]
26229    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26230        use arbitrary::{Arbitrary, Unstructured};
26231        let mut buf = [0u8; 1024];
26232        rng.fill_bytes(&mut buf);
26233        let mut unstructured = Unstructured::new(&buf);
26234        Self::arbitrary(&mut unstructured).unwrap_or_default()
26235    }
26236}
26237impl Default for SAFETY_ALLOWED_AREA_DATA {
26238    fn default() -> Self {
26239        Self::DEFAULT.clone()
26240    }
26241}
26242impl MessageData for SAFETY_ALLOWED_AREA_DATA {
26243    type Message = MavMessage;
26244    const ID: u32 = 55u32;
26245    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
26246    const EXTRA_CRC: u8 = 3u8;
26247    const ENCODED_LEN: usize = 25usize;
26248    fn deser(
26249        _version: MavlinkVersion,
26250        __input: &[u8],
26251    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26252        let avail_len = __input.len();
26253        let mut payload_buf = [0; Self::ENCODED_LEN];
26254        let mut buf = if avail_len < Self::ENCODED_LEN {
26255            payload_buf[0..avail_len].copy_from_slice(__input);
26256            Bytes::new(&payload_buf)
26257        } else {
26258            Bytes::new(__input)
26259        };
26260        let mut __struct = Self::default();
26261        __struct.p1x = buf.get_f32_le();
26262        __struct.p1y = buf.get_f32_le();
26263        __struct.p1z = buf.get_f32_le();
26264        __struct.p2x = buf.get_f32_le();
26265        __struct.p2y = buf.get_f32_le();
26266        __struct.p2z = buf.get_f32_le();
26267        let tmp = buf.get_u8();
26268        __struct.frame =
26269            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26270                enum_type: "MavFrame",
26271                value: tmp as u32,
26272            })?;
26273        Ok(__struct)
26274    }
26275    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26276        let mut __tmp = BytesMut::new(bytes);
26277        #[allow(clippy::absurd_extreme_comparisons)]
26278        #[allow(unused_comparisons)]
26279        if __tmp.remaining() < Self::ENCODED_LEN {
26280            panic!(
26281                "buffer is too small (need {} bytes, but got {})",
26282                Self::ENCODED_LEN,
26283                __tmp.remaining(),
26284            )
26285        }
26286        __tmp.put_f32_le(self.p1x);
26287        __tmp.put_f32_le(self.p1y);
26288        __tmp.put_f32_le(self.p1z);
26289        __tmp.put_f32_le(self.p2x);
26290        __tmp.put_f32_le(self.p2y);
26291        __tmp.put_f32_le(self.p2z);
26292        __tmp.put_u8(self.frame as u8);
26293        if matches!(version, MavlinkVersion::V2) {
26294            let len = __tmp.len();
26295            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26296        } else {
26297            __tmp.len()
26298        }
26299    }
26300}
26301#[doc = "id: 259"]
26302#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
26303#[derive(Debug, Clone, PartialEq)]
26304#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26305#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26306pub struct CAMERA_INFORMATION_DATA {
26307    #[doc = "Timestamp (time since system boot)."]
26308    pub time_boot_ms: u32,
26309    #[doc = "0xff). Use 0 if not known."]
26310    pub firmware_version: u32,
26311    #[doc = "Focal length. Use NaN if not known."]
26312    pub focal_length: f32,
26313    #[doc = "Image sensor size horizontal. Use NaN if not known."]
26314    pub sensor_size_h: f32,
26315    #[doc = "Image sensor size vertical. Use NaN if not known."]
26316    pub sensor_size_v: f32,
26317    #[doc = "Bitmap of camera capability flags."]
26318    pub flags: CameraCapFlags,
26319    #[doc = "Horizontal image resolution. Use 0 if not known."]
26320    pub resolution_h: u16,
26321    #[doc = "Vertical image resolution. Use 0 if not known."]
26322    pub resolution_v: u16,
26323    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
26324    pub cam_definition_version: u16,
26325    #[doc = "Name of the camera vendor"]
26326    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26327    pub vendor_name: [u8; 32],
26328    #[doc = "Name of the camera model"]
26329    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26330    pub model_name: [u8; 32],
26331    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
26332    pub lens_id: u8,
26333    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
26334    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26335    pub cam_definition_uri: [u8; 140],
26336    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
26337    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26338    pub gimbal_device_id: u8,
26339    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
26340    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26341    pub camera_device_id: u8,
26342}
26343impl CAMERA_INFORMATION_DATA {
26344    pub const ENCODED_LEN: usize = 237usize;
26345    pub const DEFAULT: Self = Self {
26346        time_boot_ms: 0_u32,
26347        firmware_version: 0_u32,
26348        focal_length: 0.0_f32,
26349        sensor_size_h: 0.0_f32,
26350        sensor_size_v: 0.0_f32,
26351        flags: CameraCapFlags::DEFAULT,
26352        resolution_h: 0_u16,
26353        resolution_v: 0_u16,
26354        cam_definition_version: 0_u16,
26355        vendor_name: [0_u8; 32usize],
26356        model_name: [0_u8; 32usize],
26357        lens_id: 0_u8,
26358        cam_definition_uri: [0_u8; 140usize],
26359        gimbal_device_id: 0_u8,
26360        camera_device_id: 0_u8,
26361    };
26362    #[cfg(feature = "arbitrary")]
26363    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26364        use arbitrary::{Arbitrary, Unstructured};
26365        let mut buf = [0u8; 1024];
26366        rng.fill_bytes(&mut buf);
26367        let mut unstructured = Unstructured::new(&buf);
26368        Self::arbitrary(&mut unstructured).unwrap_or_default()
26369    }
26370}
26371impl Default for CAMERA_INFORMATION_DATA {
26372    fn default() -> Self {
26373        Self::DEFAULT.clone()
26374    }
26375}
26376impl MessageData for CAMERA_INFORMATION_DATA {
26377    type Message = MavMessage;
26378    const ID: u32 = 259u32;
26379    const NAME: &'static str = "CAMERA_INFORMATION";
26380    const EXTRA_CRC: u8 = 92u8;
26381    const ENCODED_LEN: usize = 237usize;
26382    fn deser(
26383        _version: MavlinkVersion,
26384        __input: &[u8],
26385    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26386        let avail_len = __input.len();
26387        let mut payload_buf = [0; Self::ENCODED_LEN];
26388        let mut buf = if avail_len < Self::ENCODED_LEN {
26389            payload_buf[0..avail_len].copy_from_slice(__input);
26390            Bytes::new(&payload_buf)
26391        } else {
26392            Bytes::new(__input)
26393        };
26394        let mut __struct = Self::default();
26395        __struct.time_boot_ms = buf.get_u32_le();
26396        __struct.firmware_version = buf.get_u32_le();
26397        __struct.focal_length = buf.get_f32_le();
26398        __struct.sensor_size_h = buf.get_f32_le();
26399        __struct.sensor_size_v = buf.get_f32_le();
26400        let tmp = buf.get_u32_le();
26401        __struct.flags = CameraCapFlags::from_bits(tmp & CameraCapFlags::all().bits()).ok_or(
26402            ::mavlink_core::error::ParserError::InvalidFlag {
26403                flag_type: "CameraCapFlags",
26404                value: tmp as u32,
26405            },
26406        )?;
26407        __struct.resolution_h = buf.get_u16_le();
26408        __struct.resolution_v = buf.get_u16_le();
26409        __struct.cam_definition_version = buf.get_u16_le();
26410        for v in &mut __struct.vendor_name {
26411            let val = buf.get_u8();
26412            *v = val;
26413        }
26414        for v in &mut __struct.model_name {
26415            let val = buf.get_u8();
26416            *v = val;
26417        }
26418        __struct.lens_id = buf.get_u8();
26419        for v in &mut __struct.cam_definition_uri {
26420            let val = buf.get_u8();
26421            *v = val;
26422        }
26423        __struct.gimbal_device_id = buf.get_u8();
26424        __struct.camera_device_id = buf.get_u8();
26425        Ok(__struct)
26426    }
26427    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26428        let mut __tmp = BytesMut::new(bytes);
26429        #[allow(clippy::absurd_extreme_comparisons)]
26430        #[allow(unused_comparisons)]
26431        if __tmp.remaining() < Self::ENCODED_LEN {
26432            panic!(
26433                "buffer is too small (need {} bytes, but got {})",
26434                Self::ENCODED_LEN,
26435                __tmp.remaining(),
26436            )
26437        }
26438        __tmp.put_u32_le(self.time_boot_ms);
26439        __tmp.put_u32_le(self.firmware_version);
26440        __tmp.put_f32_le(self.focal_length);
26441        __tmp.put_f32_le(self.sensor_size_h);
26442        __tmp.put_f32_le(self.sensor_size_v);
26443        __tmp.put_u32_le(self.flags.bits());
26444        __tmp.put_u16_le(self.resolution_h);
26445        __tmp.put_u16_le(self.resolution_v);
26446        __tmp.put_u16_le(self.cam_definition_version);
26447        for val in &self.vendor_name {
26448            __tmp.put_u8(*val);
26449        }
26450        for val in &self.model_name {
26451            __tmp.put_u8(*val);
26452        }
26453        __tmp.put_u8(self.lens_id);
26454        for val in &self.cam_definition_uri {
26455            __tmp.put_u8(*val);
26456        }
26457        __tmp.put_u8(self.gimbal_device_id);
26458        __tmp.put_u8(self.camera_device_id);
26459        if matches!(version, MavlinkVersion::V2) {
26460            let len = __tmp.len();
26461            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26462        } else {
26463            __tmp.len()
26464        }
26465    }
26466}
26467#[doc = "id: 33"]
26468#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
26469#[derive(Debug, Clone, PartialEq)]
26470#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26471#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26472pub struct GLOBAL_POSITION_INT_DATA {
26473    #[doc = "Timestamp (time since system boot)."]
26474    pub time_boot_ms: u32,
26475    #[doc = "Latitude, expressed"]
26476    pub lat: i32,
26477    #[doc = "Longitude, expressed"]
26478    pub lon: i32,
26479    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
26480    pub alt: i32,
26481    #[doc = "Altitude above home"]
26482    pub relative_alt: i32,
26483    #[doc = "Ground X Speed (Latitude, positive north)"]
26484    pub vx: i16,
26485    #[doc = "Ground Y Speed (Longitude, positive east)"]
26486    pub vy: i16,
26487    #[doc = "Ground Z Speed (Altitude, positive down)"]
26488    pub vz: i16,
26489    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
26490    pub hdg: u16,
26491}
26492impl GLOBAL_POSITION_INT_DATA {
26493    pub const ENCODED_LEN: usize = 28usize;
26494    pub const DEFAULT: Self = Self {
26495        time_boot_ms: 0_u32,
26496        lat: 0_i32,
26497        lon: 0_i32,
26498        alt: 0_i32,
26499        relative_alt: 0_i32,
26500        vx: 0_i16,
26501        vy: 0_i16,
26502        vz: 0_i16,
26503        hdg: 0_u16,
26504    };
26505    #[cfg(feature = "arbitrary")]
26506    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26507        use arbitrary::{Arbitrary, Unstructured};
26508        let mut buf = [0u8; 1024];
26509        rng.fill_bytes(&mut buf);
26510        let mut unstructured = Unstructured::new(&buf);
26511        Self::arbitrary(&mut unstructured).unwrap_or_default()
26512    }
26513}
26514impl Default for GLOBAL_POSITION_INT_DATA {
26515    fn default() -> Self {
26516        Self::DEFAULT.clone()
26517    }
26518}
26519impl MessageData for GLOBAL_POSITION_INT_DATA {
26520    type Message = MavMessage;
26521    const ID: u32 = 33u32;
26522    const NAME: &'static str = "GLOBAL_POSITION_INT";
26523    const EXTRA_CRC: u8 = 104u8;
26524    const ENCODED_LEN: usize = 28usize;
26525    fn deser(
26526        _version: MavlinkVersion,
26527        __input: &[u8],
26528    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26529        let avail_len = __input.len();
26530        let mut payload_buf = [0; Self::ENCODED_LEN];
26531        let mut buf = if avail_len < Self::ENCODED_LEN {
26532            payload_buf[0..avail_len].copy_from_slice(__input);
26533            Bytes::new(&payload_buf)
26534        } else {
26535            Bytes::new(__input)
26536        };
26537        let mut __struct = Self::default();
26538        __struct.time_boot_ms = buf.get_u32_le();
26539        __struct.lat = buf.get_i32_le();
26540        __struct.lon = buf.get_i32_le();
26541        __struct.alt = buf.get_i32_le();
26542        __struct.relative_alt = buf.get_i32_le();
26543        __struct.vx = buf.get_i16_le();
26544        __struct.vy = buf.get_i16_le();
26545        __struct.vz = buf.get_i16_le();
26546        __struct.hdg = buf.get_u16_le();
26547        Ok(__struct)
26548    }
26549    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26550        let mut __tmp = BytesMut::new(bytes);
26551        #[allow(clippy::absurd_extreme_comparisons)]
26552        #[allow(unused_comparisons)]
26553        if __tmp.remaining() < Self::ENCODED_LEN {
26554            panic!(
26555                "buffer is too small (need {} bytes, but got {})",
26556                Self::ENCODED_LEN,
26557                __tmp.remaining(),
26558            )
26559        }
26560        __tmp.put_u32_le(self.time_boot_ms);
26561        __tmp.put_i32_le(self.lat);
26562        __tmp.put_i32_le(self.lon);
26563        __tmp.put_i32_le(self.alt);
26564        __tmp.put_i32_le(self.relative_alt);
26565        __tmp.put_i16_le(self.vx);
26566        __tmp.put_i16_le(self.vy);
26567        __tmp.put_i16_le(self.vz);
26568        __tmp.put_u16_le(self.hdg);
26569        if matches!(version, MavlinkVersion::V2) {
26570            let len = __tmp.len();
26571            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26572        } else {
26573            __tmp.len()
26574        }
26575    }
26576}
26577#[doc = "id: 116"]
26578#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
26579#[derive(Debug, Clone, PartialEq)]
26580#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26581#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26582pub struct SCALED_IMU2_DATA {
26583    #[doc = "Timestamp (time since system boot)."]
26584    pub time_boot_ms: u32,
26585    #[doc = "X acceleration"]
26586    pub xacc: i16,
26587    #[doc = "Y acceleration"]
26588    pub yacc: i16,
26589    #[doc = "Z acceleration"]
26590    pub zacc: i16,
26591    #[doc = "Angular speed around X axis"]
26592    pub xgyro: i16,
26593    #[doc = "Angular speed around Y axis"]
26594    pub ygyro: i16,
26595    #[doc = "Angular speed around Z axis"]
26596    pub zgyro: i16,
26597    #[doc = "X Magnetic field"]
26598    pub xmag: i16,
26599    #[doc = "Y Magnetic field"]
26600    pub ymag: i16,
26601    #[doc = "Z Magnetic field"]
26602    pub zmag: i16,
26603    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26604    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26605    pub temperature: i16,
26606}
26607impl SCALED_IMU2_DATA {
26608    pub const ENCODED_LEN: usize = 24usize;
26609    pub const DEFAULT: Self = Self {
26610        time_boot_ms: 0_u32,
26611        xacc: 0_i16,
26612        yacc: 0_i16,
26613        zacc: 0_i16,
26614        xgyro: 0_i16,
26615        ygyro: 0_i16,
26616        zgyro: 0_i16,
26617        xmag: 0_i16,
26618        ymag: 0_i16,
26619        zmag: 0_i16,
26620        temperature: 0_i16,
26621    };
26622    #[cfg(feature = "arbitrary")]
26623    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26624        use arbitrary::{Arbitrary, Unstructured};
26625        let mut buf = [0u8; 1024];
26626        rng.fill_bytes(&mut buf);
26627        let mut unstructured = Unstructured::new(&buf);
26628        Self::arbitrary(&mut unstructured).unwrap_or_default()
26629    }
26630}
26631impl Default for SCALED_IMU2_DATA {
26632    fn default() -> Self {
26633        Self::DEFAULT.clone()
26634    }
26635}
26636impl MessageData for SCALED_IMU2_DATA {
26637    type Message = MavMessage;
26638    const ID: u32 = 116u32;
26639    const NAME: &'static str = "SCALED_IMU2";
26640    const EXTRA_CRC: u8 = 76u8;
26641    const ENCODED_LEN: usize = 24usize;
26642    fn deser(
26643        _version: MavlinkVersion,
26644        __input: &[u8],
26645    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26646        let avail_len = __input.len();
26647        let mut payload_buf = [0; Self::ENCODED_LEN];
26648        let mut buf = if avail_len < Self::ENCODED_LEN {
26649            payload_buf[0..avail_len].copy_from_slice(__input);
26650            Bytes::new(&payload_buf)
26651        } else {
26652            Bytes::new(__input)
26653        };
26654        let mut __struct = Self::default();
26655        __struct.time_boot_ms = buf.get_u32_le();
26656        __struct.xacc = buf.get_i16_le();
26657        __struct.yacc = buf.get_i16_le();
26658        __struct.zacc = buf.get_i16_le();
26659        __struct.xgyro = buf.get_i16_le();
26660        __struct.ygyro = buf.get_i16_le();
26661        __struct.zgyro = buf.get_i16_le();
26662        __struct.xmag = buf.get_i16_le();
26663        __struct.ymag = buf.get_i16_le();
26664        __struct.zmag = buf.get_i16_le();
26665        __struct.temperature = buf.get_i16_le();
26666        Ok(__struct)
26667    }
26668    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26669        let mut __tmp = BytesMut::new(bytes);
26670        #[allow(clippy::absurd_extreme_comparisons)]
26671        #[allow(unused_comparisons)]
26672        if __tmp.remaining() < Self::ENCODED_LEN {
26673            panic!(
26674                "buffer is too small (need {} bytes, but got {})",
26675                Self::ENCODED_LEN,
26676                __tmp.remaining(),
26677            )
26678        }
26679        __tmp.put_u32_le(self.time_boot_ms);
26680        __tmp.put_i16_le(self.xacc);
26681        __tmp.put_i16_le(self.yacc);
26682        __tmp.put_i16_le(self.zacc);
26683        __tmp.put_i16_le(self.xgyro);
26684        __tmp.put_i16_le(self.ygyro);
26685        __tmp.put_i16_le(self.zgyro);
26686        __tmp.put_i16_le(self.xmag);
26687        __tmp.put_i16_le(self.ymag);
26688        __tmp.put_i16_le(self.zmag);
26689        __tmp.put_i16_le(self.temperature);
26690        if matches!(version, MavlinkVersion::V2) {
26691            let len = __tmp.len();
26692            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26693        } else {
26694            __tmp.len()
26695        }
26696    }
26697}
26698#[doc = "id: 36"]
26699#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
26700#[derive(Debug, Clone, PartialEq)]
26701#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26702#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26703pub struct SERVO_OUTPUT_RAW_DATA {
26704    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
26705    pub time_usec: u32,
26706    #[doc = "Servo output 1 value"]
26707    pub servo1_raw: u16,
26708    #[doc = "Servo output 2 value"]
26709    pub servo2_raw: u16,
26710    #[doc = "Servo output 3 value"]
26711    pub servo3_raw: u16,
26712    #[doc = "Servo output 4 value"]
26713    pub servo4_raw: u16,
26714    #[doc = "Servo output 5 value"]
26715    pub servo5_raw: u16,
26716    #[doc = "Servo output 6 value"]
26717    pub servo6_raw: u16,
26718    #[doc = "Servo output 7 value"]
26719    pub servo7_raw: u16,
26720    #[doc = "Servo output 8 value"]
26721    pub servo8_raw: u16,
26722    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26723    pub port: u8,
26724    #[doc = "Servo output 9 value"]
26725    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26726    pub servo9_raw: u16,
26727    #[doc = "Servo output 10 value"]
26728    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26729    pub servo10_raw: u16,
26730    #[doc = "Servo output 11 value"]
26731    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26732    pub servo11_raw: u16,
26733    #[doc = "Servo output 12 value"]
26734    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26735    pub servo12_raw: u16,
26736    #[doc = "Servo output 13 value"]
26737    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26738    pub servo13_raw: u16,
26739    #[doc = "Servo output 14 value"]
26740    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26741    pub servo14_raw: u16,
26742    #[doc = "Servo output 15 value"]
26743    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26744    pub servo15_raw: u16,
26745    #[doc = "Servo output 16 value"]
26746    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26747    pub servo16_raw: u16,
26748}
26749impl SERVO_OUTPUT_RAW_DATA {
26750    pub const ENCODED_LEN: usize = 37usize;
26751    pub const DEFAULT: Self = Self {
26752        time_usec: 0_u32,
26753        servo1_raw: 0_u16,
26754        servo2_raw: 0_u16,
26755        servo3_raw: 0_u16,
26756        servo4_raw: 0_u16,
26757        servo5_raw: 0_u16,
26758        servo6_raw: 0_u16,
26759        servo7_raw: 0_u16,
26760        servo8_raw: 0_u16,
26761        port: 0_u8,
26762        servo9_raw: 0_u16,
26763        servo10_raw: 0_u16,
26764        servo11_raw: 0_u16,
26765        servo12_raw: 0_u16,
26766        servo13_raw: 0_u16,
26767        servo14_raw: 0_u16,
26768        servo15_raw: 0_u16,
26769        servo16_raw: 0_u16,
26770    };
26771    #[cfg(feature = "arbitrary")]
26772    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26773        use arbitrary::{Arbitrary, Unstructured};
26774        let mut buf = [0u8; 1024];
26775        rng.fill_bytes(&mut buf);
26776        let mut unstructured = Unstructured::new(&buf);
26777        Self::arbitrary(&mut unstructured).unwrap_or_default()
26778    }
26779}
26780impl Default for SERVO_OUTPUT_RAW_DATA {
26781    fn default() -> Self {
26782        Self::DEFAULT.clone()
26783    }
26784}
26785impl MessageData for SERVO_OUTPUT_RAW_DATA {
26786    type Message = MavMessage;
26787    const ID: u32 = 36u32;
26788    const NAME: &'static str = "SERVO_OUTPUT_RAW";
26789    const EXTRA_CRC: u8 = 222u8;
26790    const ENCODED_LEN: usize = 37usize;
26791    fn deser(
26792        _version: MavlinkVersion,
26793        __input: &[u8],
26794    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26795        let avail_len = __input.len();
26796        let mut payload_buf = [0; Self::ENCODED_LEN];
26797        let mut buf = if avail_len < Self::ENCODED_LEN {
26798            payload_buf[0..avail_len].copy_from_slice(__input);
26799            Bytes::new(&payload_buf)
26800        } else {
26801            Bytes::new(__input)
26802        };
26803        let mut __struct = Self::default();
26804        __struct.time_usec = buf.get_u32_le();
26805        __struct.servo1_raw = buf.get_u16_le();
26806        __struct.servo2_raw = buf.get_u16_le();
26807        __struct.servo3_raw = buf.get_u16_le();
26808        __struct.servo4_raw = buf.get_u16_le();
26809        __struct.servo5_raw = buf.get_u16_le();
26810        __struct.servo6_raw = buf.get_u16_le();
26811        __struct.servo7_raw = buf.get_u16_le();
26812        __struct.servo8_raw = buf.get_u16_le();
26813        __struct.port = buf.get_u8();
26814        __struct.servo9_raw = buf.get_u16_le();
26815        __struct.servo10_raw = buf.get_u16_le();
26816        __struct.servo11_raw = buf.get_u16_le();
26817        __struct.servo12_raw = buf.get_u16_le();
26818        __struct.servo13_raw = buf.get_u16_le();
26819        __struct.servo14_raw = buf.get_u16_le();
26820        __struct.servo15_raw = buf.get_u16_le();
26821        __struct.servo16_raw = buf.get_u16_le();
26822        Ok(__struct)
26823    }
26824    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26825        let mut __tmp = BytesMut::new(bytes);
26826        #[allow(clippy::absurd_extreme_comparisons)]
26827        #[allow(unused_comparisons)]
26828        if __tmp.remaining() < Self::ENCODED_LEN {
26829            panic!(
26830                "buffer is too small (need {} bytes, but got {})",
26831                Self::ENCODED_LEN,
26832                __tmp.remaining(),
26833            )
26834        }
26835        __tmp.put_u32_le(self.time_usec);
26836        __tmp.put_u16_le(self.servo1_raw);
26837        __tmp.put_u16_le(self.servo2_raw);
26838        __tmp.put_u16_le(self.servo3_raw);
26839        __tmp.put_u16_le(self.servo4_raw);
26840        __tmp.put_u16_le(self.servo5_raw);
26841        __tmp.put_u16_le(self.servo6_raw);
26842        __tmp.put_u16_le(self.servo7_raw);
26843        __tmp.put_u16_le(self.servo8_raw);
26844        __tmp.put_u8(self.port);
26845        __tmp.put_u16_le(self.servo9_raw);
26846        __tmp.put_u16_le(self.servo10_raw);
26847        __tmp.put_u16_le(self.servo11_raw);
26848        __tmp.put_u16_le(self.servo12_raw);
26849        __tmp.put_u16_le(self.servo13_raw);
26850        __tmp.put_u16_le(self.servo14_raw);
26851        __tmp.put_u16_le(self.servo15_raw);
26852        __tmp.put_u16_le(self.servo16_raw);
26853        if matches!(version, MavlinkVersion::V2) {
26854            let len = __tmp.len();
26855            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26856        } else {
26857            __tmp.len()
26858        }
26859    }
26860}
26861#[doc = "id: 111"]
26862#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
26863#[derive(Debug, Clone, PartialEq)]
26864#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26865#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26866pub struct TIMESYNC_DATA {
26867    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
26868    pub tc1: i64,
26869    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
26870    pub ts1: i64,
26871    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
26872    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26873    pub target_system: u8,
26874    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
26875    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26876    pub target_component: u8,
26877}
26878impl TIMESYNC_DATA {
26879    pub const ENCODED_LEN: usize = 18usize;
26880    pub const DEFAULT: Self = Self {
26881        tc1: 0_i64,
26882        ts1: 0_i64,
26883        target_system: 0_u8,
26884        target_component: 0_u8,
26885    };
26886    #[cfg(feature = "arbitrary")]
26887    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26888        use arbitrary::{Arbitrary, Unstructured};
26889        let mut buf = [0u8; 1024];
26890        rng.fill_bytes(&mut buf);
26891        let mut unstructured = Unstructured::new(&buf);
26892        Self::arbitrary(&mut unstructured).unwrap_or_default()
26893    }
26894}
26895impl Default for TIMESYNC_DATA {
26896    fn default() -> Self {
26897        Self::DEFAULT.clone()
26898    }
26899}
26900impl MessageData for TIMESYNC_DATA {
26901    type Message = MavMessage;
26902    const ID: u32 = 111u32;
26903    const NAME: &'static str = "TIMESYNC";
26904    const EXTRA_CRC: u8 = 34u8;
26905    const ENCODED_LEN: usize = 18usize;
26906    fn deser(
26907        _version: MavlinkVersion,
26908        __input: &[u8],
26909    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26910        let avail_len = __input.len();
26911        let mut payload_buf = [0; Self::ENCODED_LEN];
26912        let mut buf = if avail_len < Self::ENCODED_LEN {
26913            payload_buf[0..avail_len].copy_from_slice(__input);
26914            Bytes::new(&payload_buf)
26915        } else {
26916            Bytes::new(__input)
26917        };
26918        let mut __struct = Self::default();
26919        __struct.tc1 = buf.get_i64_le();
26920        __struct.ts1 = buf.get_i64_le();
26921        __struct.target_system = buf.get_u8();
26922        __struct.target_component = buf.get_u8();
26923        Ok(__struct)
26924    }
26925    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26926        let mut __tmp = BytesMut::new(bytes);
26927        #[allow(clippy::absurd_extreme_comparisons)]
26928        #[allow(unused_comparisons)]
26929        if __tmp.remaining() < Self::ENCODED_LEN {
26930            panic!(
26931                "buffer is too small (need {} bytes, but got {})",
26932                Self::ENCODED_LEN,
26933                __tmp.remaining(),
26934            )
26935        }
26936        __tmp.put_i64_le(self.tc1);
26937        __tmp.put_i64_le(self.ts1);
26938        __tmp.put_u8(self.target_system);
26939        __tmp.put_u8(self.target_component);
26940        if matches!(version, MavlinkVersion::V2) {
26941            let len = __tmp.len();
26942            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26943        } else {
26944            __tmp.len()
26945        }
26946    }
26947}
26948#[doc = "id: 267"]
26949#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
26950#[derive(Debug, Clone, PartialEq)]
26951#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26952#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26953pub struct LOGGING_DATA_ACKED_DATA {
26954    #[doc = "sequence number (can wrap)"]
26955    pub sequence: u16,
26956    #[doc = "system ID of the target"]
26957    pub target_system: u8,
26958    #[doc = "component ID of the target"]
26959    pub target_component: u8,
26960    #[doc = "data length"]
26961    pub length: u8,
26962    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
26963    pub first_message_offset: u8,
26964    #[doc = "logged data"]
26965    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26966    pub data: [u8; 249],
26967}
26968impl LOGGING_DATA_ACKED_DATA {
26969    pub const ENCODED_LEN: usize = 255usize;
26970    pub const DEFAULT: Self = Self {
26971        sequence: 0_u16,
26972        target_system: 0_u8,
26973        target_component: 0_u8,
26974        length: 0_u8,
26975        first_message_offset: 0_u8,
26976        data: [0_u8; 249usize],
26977    };
26978    #[cfg(feature = "arbitrary")]
26979    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26980        use arbitrary::{Arbitrary, Unstructured};
26981        let mut buf = [0u8; 1024];
26982        rng.fill_bytes(&mut buf);
26983        let mut unstructured = Unstructured::new(&buf);
26984        Self::arbitrary(&mut unstructured).unwrap_or_default()
26985    }
26986}
26987impl Default for LOGGING_DATA_ACKED_DATA {
26988    fn default() -> Self {
26989        Self::DEFAULT.clone()
26990    }
26991}
26992impl MessageData for LOGGING_DATA_ACKED_DATA {
26993    type Message = MavMessage;
26994    const ID: u32 = 267u32;
26995    const NAME: &'static str = "LOGGING_DATA_ACKED";
26996    const EXTRA_CRC: u8 = 35u8;
26997    const ENCODED_LEN: usize = 255usize;
26998    fn deser(
26999        _version: MavlinkVersion,
27000        __input: &[u8],
27001    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27002        let avail_len = __input.len();
27003        let mut payload_buf = [0; Self::ENCODED_LEN];
27004        let mut buf = if avail_len < Self::ENCODED_LEN {
27005            payload_buf[0..avail_len].copy_from_slice(__input);
27006            Bytes::new(&payload_buf)
27007        } else {
27008            Bytes::new(__input)
27009        };
27010        let mut __struct = Self::default();
27011        __struct.sequence = buf.get_u16_le();
27012        __struct.target_system = buf.get_u8();
27013        __struct.target_component = buf.get_u8();
27014        __struct.length = buf.get_u8();
27015        __struct.first_message_offset = buf.get_u8();
27016        for v in &mut __struct.data {
27017            let val = buf.get_u8();
27018            *v = val;
27019        }
27020        Ok(__struct)
27021    }
27022    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27023        let mut __tmp = BytesMut::new(bytes);
27024        #[allow(clippy::absurd_extreme_comparisons)]
27025        #[allow(unused_comparisons)]
27026        if __tmp.remaining() < Self::ENCODED_LEN {
27027            panic!(
27028                "buffer is too small (need {} bytes, but got {})",
27029                Self::ENCODED_LEN,
27030                __tmp.remaining(),
27031            )
27032        }
27033        __tmp.put_u16_le(self.sequence);
27034        __tmp.put_u8(self.target_system);
27035        __tmp.put_u8(self.target_component);
27036        __tmp.put_u8(self.length);
27037        __tmp.put_u8(self.first_message_offset);
27038        for val in &self.data {
27039            __tmp.put_u8(*val);
27040        }
27041        if matches!(version, MavlinkVersion::V2) {
27042            let len = __tmp.len();
27043            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27044        } else {
27045            __tmp.len()
27046        }
27047    }
27048}
27049#[doc = "id: 162"]
27050#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
27051#[derive(Debug, Clone, PartialEq)]
27052#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27053#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27054pub struct FENCE_STATUS_DATA {
27055    #[doc = "Time (since boot) of last breach."]
27056    pub breach_time: u32,
27057    #[doc = "Number of fence breaches."]
27058    pub breach_count: u16,
27059    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
27060    pub breach_status: u8,
27061    #[doc = "Last breach type."]
27062    pub breach_type: FenceBreach,
27063    #[doc = "Active action to prevent fence breach"]
27064    #[cfg_attr(feature = "serde", serde(default))]
27065    pub breach_mitigation: FenceMitigate,
27066}
27067impl FENCE_STATUS_DATA {
27068    pub const ENCODED_LEN: usize = 9usize;
27069    pub const DEFAULT: Self = Self {
27070        breach_time: 0_u32,
27071        breach_count: 0_u16,
27072        breach_status: 0_u8,
27073        breach_type: FenceBreach::DEFAULT,
27074        breach_mitigation: FenceMitigate::DEFAULT,
27075    };
27076    #[cfg(feature = "arbitrary")]
27077    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27078        use arbitrary::{Arbitrary, Unstructured};
27079        let mut buf = [0u8; 1024];
27080        rng.fill_bytes(&mut buf);
27081        let mut unstructured = Unstructured::new(&buf);
27082        Self::arbitrary(&mut unstructured).unwrap_or_default()
27083    }
27084}
27085impl Default for FENCE_STATUS_DATA {
27086    fn default() -> Self {
27087        Self::DEFAULT.clone()
27088    }
27089}
27090impl MessageData for FENCE_STATUS_DATA {
27091    type Message = MavMessage;
27092    const ID: u32 = 162u32;
27093    const NAME: &'static str = "FENCE_STATUS";
27094    const EXTRA_CRC: u8 = 189u8;
27095    const ENCODED_LEN: usize = 9usize;
27096    fn deser(
27097        _version: MavlinkVersion,
27098        __input: &[u8],
27099    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27100        let avail_len = __input.len();
27101        let mut payload_buf = [0; Self::ENCODED_LEN];
27102        let mut buf = if avail_len < Self::ENCODED_LEN {
27103            payload_buf[0..avail_len].copy_from_slice(__input);
27104            Bytes::new(&payload_buf)
27105        } else {
27106            Bytes::new(__input)
27107        };
27108        let mut __struct = Self::default();
27109        __struct.breach_time = buf.get_u32_le();
27110        __struct.breach_count = buf.get_u16_le();
27111        __struct.breach_status = buf.get_u8();
27112        let tmp = buf.get_u8();
27113        __struct.breach_type =
27114            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27115                enum_type: "FenceBreach",
27116                value: tmp as u32,
27117            })?;
27118        let tmp = buf.get_u8();
27119        __struct.breach_mitigation =
27120            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27121                enum_type: "FenceMitigate",
27122                value: tmp as u32,
27123            })?;
27124        Ok(__struct)
27125    }
27126    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27127        let mut __tmp = BytesMut::new(bytes);
27128        #[allow(clippy::absurd_extreme_comparisons)]
27129        #[allow(unused_comparisons)]
27130        if __tmp.remaining() < Self::ENCODED_LEN {
27131            panic!(
27132                "buffer is too small (need {} bytes, but got {})",
27133                Self::ENCODED_LEN,
27134                __tmp.remaining(),
27135            )
27136        }
27137        __tmp.put_u32_le(self.breach_time);
27138        __tmp.put_u16_le(self.breach_count);
27139        __tmp.put_u8(self.breach_status);
27140        __tmp.put_u8(self.breach_type as u8);
27141        __tmp.put_u8(self.breach_mitigation as u8);
27142        if matches!(version, MavlinkVersion::V2) {
27143            let len = __tmp.len();
27144            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27145        } else {
27146            __tmp.len()
27147        }
27148    }
27149}
27150#[doc = "id: 109"]
27151#[doc = "Status generated by radio and injected into MAVLink stream."]
27152#[derive(Debug, Clone, PartialEq)]
27153#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27154#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27155pub struct RADIO_STATUS_DATA {
27156    #[doc = "Count of radio packet receive errors (since boot)."]
27157    pub rxerrors: u16,
27158    #[doc = "Count of error corrected radio packets (since boot)."]
27159    pub fixed: u16,
27160    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
27161    pub rssi: u8,
27162    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
27163    pub remrssi: u8,
27164    #[doc = "Remaining free transmitter buffer space."]
27165    pub txbuf: u8,
27166    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
27167    pub noise: u8,
27168    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
27169    pub remnoise: u8,
27170}
27171impl RADIO_STATUS_DATA {
27172    pub const ENCODED_LEN: usize = 9usize;
27173    pub const DEFAULT: Self = Self {
27174        rxerrors: 0_u16,
27175        fixed: 0_u16,
27176        rssi: 0_u8,
27177        remrssi: 0_u8,
27178        txbuf: 0_u8,
27179        noise: 0_u8,
27180        remnoise: 0_u8,
27181    };
27182    #[cfg(feature = "arbitrary")]
27183    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27184        use arbitrary::{Arbitrary, Unstructured};
27185        let mut buf = [0u8; 1024];
27186        rng.fill_bytes(&mut buf);
27187        let mut unstructured = Unstructured::new(&buf);
27188        Self::arbitrary(&mut unstructured).unwrap_or_default()
27189    }
27190}
27191impl Default for RADIO_STATUS_DATA {
27192    fn default() -> Self {
27193        Self::DEFAULT.clone()
27194    }
27195}
27196impl MessageData for RADIO_STATUS_DATA {
27197    type Message = MavMessage;
27198    const ID: u32 = 109u32;
27199    const NAME: &'static str = "RADIO_STATUS";
27200    const EXTRA_CRC: u8 = 185u8;
27201    const ENCODED_LEN: usize = 9usize;
27202    fn deser(
27203        _version: MavlinkVersion,
27204        __input: &[u8],
27205    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27206        let avail_len = __input.len();
27207        let mut payload_buf = [0; Self::ENCODED_LEN];
27208        let mut buf = if avail_len < Self::ENCODED_LEN {
27209            payload_buf[0..avail_len].copy_from_slice(__input);
27210            Bytes::new(&payload_buf)
27211        } else {
27212            Bytes::new(__input)
27213        };
27214        let mut __struct = Self::default();
27215        __struct.rxerrors = buf.get_u16_le();
27216        __struct.fixed = buf.get_u16_le();
27217        __struct.rssi = buf.get_u8();
27218        __struct.remrssi = buf.get_u8();
27219        __struct.txbuf = buf.get_u8();
27220        __struct.noise = buf.get_u8();
27221        __struct.remnoise = buf.get_u8();
27222        Ok(__struct)
27223    }
27224    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27225        let mut __tmp = BytesMut::new(bytes);
27226        #[allow(clippy::absurd_extreme_comparisons)]
27227        #[allow(unused_comparisons)]
27228        if __tmp.remaining() < Self::ENCODED_LEN {
27229            panic!(
27230                "buffer is too small (need {} bytes, but got {})",
27231                Self::ENCODED_LEN,
27232                __tmp.remaining(),
27233            )
27234        }
27235        __tmp.put_u16_le(self.rxerrors);
27236        __tmp.put_u16_le(self.fixed);
27237        __tmp.put_u8(self.rssi);
27238        __tmp.put_u8(self.remrssi);
27239        __tmp.put_u8(self.txbuf);
27240        __tmp.put_u8(self.noise);
27241        __tmp.put_u8(self.remnoise);
27242        if matches!(version, MavlinkVersion::V2) {
27243            let len = __tmp.len();
27244            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27245        } else {
27246            __tmp.len()
27247        }
27248    }
27249}
27250#[doc = "id: 436"]
27251#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
27252#[derive(Debug, Clone, PartialEq)]
27253#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27254#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27255pub struct CURRENT_MODE_DATA {
27256    #[doc = "A bitfield for use for autopilot-specific flags"]
27257    pub custom_mode: u32,
27258    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
27259    pub intended_custom_mode: u32,
27260    #[doc = "Standard mode."]
27261    pub standard_mode: MavStandardMode,
27262}
27263impl CURRENT_MODE_DATA {
27264    pub const ENCODED_LEN: usize = 9usize;
27265    pub const DEFAULT: Self = Self {
27266        custom_mode: 0_u32,
27267        intended_custom_mode: 0_u32,
27268        standard_mode: MavStandardMode::DEFAULT,
27269    };
27270    #[cfg(feature = "arbitrary")]
27271    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27272        use arbitrary::{Arbitrary, Unstructured};
27273        let mut buf = [0u8; 1024];
27274        rng.fill_bytes(&mut buf);
27275        let mut unstructured = Unstructured::new(&buf);
27276        Self::arbitrary(&mut unstructured).unwrap_or_default()
27277    }
27278}
27279impl Default for CURRENT_MODE_DATA {
27280    fn default() -> Self {
27281        Self::DEFAULT.clone()
27282    }
27283}
27284impl MessageData for CURRENT_MODE_DATA {
27285    type Message = MavMessage;
27286    const ID: u32 = 436u32;
27287    const NAME: &'static str = "CURRENT_MODE";
27288    const EXTRA_CRC: u8 = 193u8;
27289    const ENCODED_LEN: usize = 9usize;
27290    fn deser(
27291        _version: MavlinkVersion,
27292        __input: &[u8],
27293    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27294        let avail_len = __input.len();
27295        let mut payload_buf = [0; Self::ENCODED_LEN];
27296        let mut buf = if avail_len < Self::ENCODED_LEN {
27297            payload_buf[0..avail_len].copy_from_slice(__input);
27298            Bytes::new(&payload_buf)
27299        } else {
27300            Bytes::new(__input)
27301        };
27302        let mut __struct = Self::default();
27303        __struct.custom_mode = buf.get_u32_le();
27304        __struct.intended_custom_mode = buf.get_u32_le();
27305        let tmp = buf.get_u8();
27306        __struct.standard_mode =
27307            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27308                enum_type: "MavStandardMode",
27309                value: tmp as u32,
27310            })?;
27311        Ok(__struct)
27312    }
27313    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27314        let mut __tmp = BytesMut::new(bytes);
27315        #[allow(clippy::absurd_extreme_comparisons)]
27316        #[allow(unused_comparisons)]
27317        if __tmp.remaining() < Self::ENCODED_LEN {
27318            panic!(
27319                "buffer is too small (need {} bytes, but got {})",
27320                Self::ENCODED_LEN,
27321                __tmp.remaining(),
27322            )
27323        }
27324        __tmp.put_u32_le(self.custom_mode);
27325        __tmp.put_u32_le(self.intended_custom_mode);
27326        __tmp.put_u8(self.standard_mode as u8);
27327        if matches!(version, MavlinkVersion::V2) {
27328            let len = __tmp.len();
27329            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27330        } else {
27331            __tmp.len()
27332        }
27333    }
27334}
27335#[doc = "id: 360"]
27336#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
27337#[derive(Debug, Clone, PartialEq)]
27338#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27339#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27340pub struct ORBIT_EXECUTION_STATUS_DATA {
27341    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27342    pub time_usec: u64,
27343    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
27344    pub radius: f32,
27345    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
27346    pub x: i32,
27347    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
27348    pub y: i32,
27349    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
27350    pub z: f32,
27351    #[doc = "The coordinate system of the fields: x, y, z."]
27352    pub frame: MavFrame,
27353}
27354impl ORBIT_EXECUTION_STATUS_DATA {
27355    pub const ENCODED_LEN: usize = 25usize;
27356    pub const DEFAULT: Self = Self {
27357        time_usec: 0_u64,
27358        radius: 0.0_f32,
27359        x: 0_i32,
27360        y: 0_i32,
27361        z: 0.0_f32,
27362        frame: MavFrame::DEFAULT,
27363    };
27364    #[cfg(feature = "arbitrary")]
27365    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27366        use arbitrary::{Arbitrary, Unstructured};
27367        let mut buf = [0u8; 1024];
27368        rng.fill_bytes(&mut buf);
27369        let mut unstructured = Unstructured::new(&buf);
27370        Self::arbitrary(&mut unstructured).unwrap_or_default()
27371    }
27372}
27373impl Default for ORBIT_EXECUTION_STATUS_DATA {
27374    fn default() -> Self {
27375        Self::DEFAULT.clone()
27376    }
27377}
27378impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
27379    type Message = MavMessage;
27380    const ID: u32 = 360u32;
27381    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
27382    const EXTRA_CRC: u8 = 11u8;
27383    const ENCODED_LEN: usize = 25usize;
27384    fn deser(
27385        _version: MavlinkVersion,
27386        __input: &[u8],
27387    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27388        let avail_len = __input.len();
27389        let mut payload_buf = [0; Self::ENCODED_LEN];
27390        let mut buf = if avail_len < Self::ENCODED_LEN {
27391            payload_buf[0..avail_len].copy_from_slice(__input);
27392            Bytes::new(&payload_buf)
27393        } else {
27394            Bytes::new(__input)
27395        };
27396        let mut __struct = Self::default();
27397        __struct.time_usec = buf.get_u64_le();
27398        __struct.radius = buf.get_f32_le();
27399        __struct.x = buf.get_i32_le();
27400        __struct.y = buf.get_i32_le();
27401        __struct.z = buf.get_f32_le();
27402        let tmp = buf.get_u8();
27403        __struct.frame =
27404            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27405                enum_type: "MavFrame",
27406                value: tmp as u32,
27407            })?;
27408        Ok(__struct)
27409    }
27410    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27411        let mut __tmp = BytesMut::new(bytes);
27412        #[allow(clippy::absurd_extreme_comparisons)]
27413        #[allow(unused_comparisons)]
27414        if __tmp.remaining() < Self::ENCODED_LEN {
27415            panic!(
27416                "buffer is too small (need {} bytes, but got {})",
27417                Self::ENCODED_LEN,
27418                __tmp.remaining(),
27419            )
27420        }
27421        __tmp.put_u64_le(self.time_usec);
27422        __tmp.put_f32_le(self.radius);
27423        __tmp.put_i32_le(self.x);
27424        __tmp.put_i32_le(self.y);
27425        __tmp.put_f32_le(self.z);
27426        __tmp.put_u8(self.frame as u8);
27427        if matches!(version, MavlinkVersion::V2) {
27428            let len = __tmp.len();
27429            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27430        } else {
27431            __tmp.len()
27432        }
27433    }
27434}
27435#[doc = "id: 231"]
27436#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
27437#[derive(Debug, Clone, PartialEq)]
27438#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27439#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27440pub struct WIND_COV_DATA {
27441    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27442    pub time_usec: u64,
27443    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
27444    pub wind_x: f32,
27445    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
27446    pub wind_y: f32,
27447    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
27448    pub wind_z: f32,
27449    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
27450    pub var_horiz: f32,
27451    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
27452    pub var_vert: f32,
27453    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
27454    pub wind_alt: f32,
27455    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
27456    pub horiz_accuracy: f32,
27457    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
27458    pub vert_accuracy: f32,
27459}
27460impl WIND_COV_DATA {
27461    pub const ENCODED_LEN: usize = 40usize;
27462    pub const DEFAULT: Self = Self {
27463        time_usec: 0_u64,
27464        wind_x: 0.0_f32,
27465        wind_y: 0.0_f32,
27466        wind_z: 0.0_f32,
27467        var_horiz: 0.0_f32,
27468        var_vert: 0.0_f32,
27469        wind_alt: 0.0_f32,
27470        horiz_accuracy: 0.0_f32,
27471        vert_accuracy: 0.0_f32,
27472    };
27473    #[cfg(feature = "arbitrary")]
27474    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27475        use arbitrary::{Arbitrary, Unstructured};
27476        let mut buf = [0u8; 1024];
27477        rng.fill_bytes(&mut buf);
27478        let mut unstructured = Unstructured::new(&buf);
27479        Self::arbitrary(&mut unstructured).unwrap_or_default()
27480    }
27481}
27482impl Default for WIND_COV_DATA {
27483    fn default() -> Self {
27484        Self::DEFAULT.clone()
27485    }
27486}
27487impl MessageData for WIND_COV_DATA {
27488    type Message = MavMessage;
27489    const ID: u32 = 231u32;
27490    const NAME: &'static str = "WIND_COV";
27491    const EXTRA_CRC: u8 = 105u8;
27492    const ENCODED_LEN: usize = 40usize;
27493    fn deser(
27494        _version: MavlinkVersion,
27495        __input: &[u8],
27496    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27497        let avail_len = __input.len();
27498        let mut payload_buf = [0; Self::ENCODED_LEN];
27499        let mut buf = if avail_len < Self::ENCODED_LEN {
27500            payload_buf[0..avail_len].copy_from_slice(__input);
27501            Bytes::new(&payload_buf)
27502        } else {
27503            Bytes::new(__input)
27504        };
27505        let mut __struct = Self::default();
27506        __struct.time_usec = buf.get_u64_le();
27507        __struct.wind_x = buf.get_f32_le();
27508        __struct.wind_y = buf.get_f32_le();
27509        __struct.wind_z = buf.get_f32_le();
27510        __struct.var_horiz = buf.get_f32_le();
27511        __struct.var_vert = buf.get_f32_le();
27512        __struct.wind_alt = buf.get_f32_le();
27513        __struct.horiz_accuracy = buf.get_f32_le();
27514        __struct.vert_accuracy = buf.get_f32_le();
27515        Ok(__struct)
27516    }
27517    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27518        let mut __tmp = BytesMut::new(bytes);
27519        #[allow(clippy::absurd_extreme_comparisons)]
27520        #[allow(unused_comparisons)]
27521        if __tmp.remaining() < Self::ENCODED_LEN {
27522            panic!(
27523                "buffer is too small (need {} bytes, but got {})",
27524                Self::ENCODED_LEN,
27525                __tmp.remaining(),
27526            )
27527        }
27528        __tmp.put_u64_le(self.time_usec);
27529        __tmp.put_f32_le(self.wind_x);
27530        __tmp.put_f32_le(self.wind_y);
27531        __tmp.put_f32_le(self.wind_z);
27532        __tmp.put_f32_le(self.var_horiz);
27533        __tmp.put_f32_le(self.var_vert);
27534        __tmp.put_f32_le(self.wind_alt);
27535        __tmp.put_f32_le(self.horiz_accuracy);
27536        __tmp.put_f32_le(self.vert_accuracy);
27537        if matches!(version, MavlinkVersion::V2) {
27538            let len = __tmp.len();
27539            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27540        } else {
27541            __tmp.len()
27542        }
27543    }
27544}
27545#[doc = "id: 380"]
27546#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
27547#[derive(Debug, Clone, PartialEq)]
27548#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27549#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27550pub struct TIME_ESTIMATE_TO_TARGET_DATA {
27551    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
27552    pub safe_return: i32,
27553    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
27554    pub land: i32,
27555    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
27556    pub mission_next_item: i32,
27557    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
27558    pub mission_end: i32,
27559    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
27560    pub commanded_action: i32,
27561}
27562impl TIME_ESTIMATE_TO_TARGET_DATA {
27563    pub const ENCODED_LEN: usize = 20usize;
27564    pub const DEFAULT: Self = Self {
27565        safe_return: 0_i32,
27566        land: 0_i32,
27567        mission_next_item: 0_i32,
27568        mission_end: 0_i32,
27569        commanded_action: 0_i32,
27570    };
27571    #[cfg(feature = "arbitrary")]
27572    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27573        use arbitrary::{Arbitrary, Unstructured};
27574        let mut buf = [0u8; 1024];
27575        rng.fill_bytes(&mut buf);
27576        let mut unstructured = Unstructured::new(&buf);
27577        Self::arbitrary(&mut unstructured).unwrap_or_default()
27578    }
27579}
27580impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
27581    fn default() -> Self {
27582        Self::DEFAULT.clone()
27583    }
27584}
27585impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
27586    type Message = MavMessage;
27587    const ID: u32 = 380u32;
27588    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
27589    const EXTRA_CRC: u8 = 232u8;
27590    const ENCODED_LEN: usize = 20usize;
27591    fn deser(
27592        _version: MavlinkVersion,
27593        __input: &[u8],
27594    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27595        let avail_len = __input.len();
27596        let mut payload_buf = [0; Self::ENCODED_LEN];
27597        let mut buf = if avail_len < Self::ENCODED_LEN {
27598            payload_buf[0..avail_len].copy_from_slice(__input);
27599            Bytes::new(&payload_buf)
27600        } else {
27601            Bytes::new(__input)
27602        };
27603        let mut __struct = Self::default();
27604        __struct.safe_return = buf.get_i32_le();
27605        __struct.land = buf.get_i32_le();
27606        __struct.mission_next_item = buf.get_i32_le();
27607        __struct.mission_end = buf.get_i32_le();
27608        __struct.commanded_action = buf.get_i32_le();
27609        Ok(__struct)
27610    }
27611    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27612        let mut __tmp = BytesMut::new(bytes);
27613        #[allow(clippy::absurd_extreme_comparisons)]
27614        #[allow(unused_comparisons)]
27615        if __tmp.remaining() < Self::ENCODED_LEN {
27616            panic!(
27617                "buffer is too small (need {} bytes, but got {})",
27618                Self::ENCODED_LEN,
27619                __tmp.remaining(),
27620            )
27621        }
27622        __tmp.put_i32_le(self.safe_return);
27623        __tmp.put_i32_le(self.land);
27624        __tmp.put_i32_le(self.mission_next_item);
27625        __tmp.put_i32_le(self.mission_end);
27626        __tmp.put_i32_le(self.commanded_action);
27627        if matches!(version, MavlinkVersion::V2) {
27628            let len = __tmp.len();
27629            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27630        } else {
27631            __tmp.len()
27632        }
27633    }
27634}
27635#[doc = "id: 87"]
27636#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
27637#[derive(Debug, Clone, PartialEq)]
27638#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27639#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27640pub struct POSITION_TARGET_GLOBAL_INT_DATA {
27641    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
27642    pub time_boot_ms: u32,
27643    #[doc = "Latitude in WGS84 frame"]
27644    pub lat_int: i32,
27645    #[doc = "Longitude in WGS84 frame"]
27646    pub lon_int: i32,
27647    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
27648    pub alt: f32,
27649    #[doc = "X velocity in NED frame"]
27650    pub vx: f32,
27651    #[doc = "Y velocity in NED frame"]
27652    pub vy: f32,
27653    #[doc = "Z velocity in NED frame"]
27654    pub vz: f32,
27655    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27656    pub afx: f32,
27657    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27658    pub afy: f32,
27659    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27660    pub afz: f32,
27661    #[doc = "yaw setpoint"]
27662    pub yaw: f32,
27663    #[doc = "yaw rate setpoint"]
27664    pub yaw_rate: f32,
27665    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
27666    pub type_mask: PositionTargetTypemask,
27667    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
27668    pub coordinate_frame: MavFrame,
27669}
27670impl POSITION_TARGET_GLOBAL_INT_DATA {
27671    pub const ENCODED_LEN: usize = 51usize;
27672    pub const DEFAULT: Self = Self {
27673        time_boot_ms: 0_u32,
27674        lat_int: 0_i32,
27675        lon_int: 0_i32,
27676        alt: 0.0_f32,
27677        vx: 0.0_f32,
27678        vy: 0.0_f32,
27679        vz: 0.0_f32,
27680        afx: 0.0_f32,
27681        afy: 0.0_f32,
27682        afz: 0.0_f32,
27683        yaw: 0.0_f32,
27684        yaw_rate: 0.0_f32,
27685        type_mask: PositionTargetTypemask::DEFAULT,
27686        coordinate_frame: MavFrame::DEFAULT,
27687    };
27688    #[cfg(feature = "arbitrary")]
27689    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27690        use arbitrary::{Arbitrary, Unstructured};
27691        let mut buf = [0u8; 1024];
27692        rng.fill_bytes(&mut buf);
27693        let mut unstructured = Unstructured::new(&buf);
27694        Self::arbitrary(&mut unstructured).unwrap_or_default()
27695    }
27696}
27697impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
27698    fn default() -> Self {
27699        Self::DEFAULT.clone()
27700    }
27701}
27702impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
27703    type Message = MavMessage;
27704    const ID: u32 = 87u32;
27705    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
27706    const EXTRA_CRC: u8 = 150u8;
27707    const ENCODED_LEN: usize = 51usize;
27708    fn deser(
27709        _version: MavlinkVersion,
27710        __input: &[u8],
27711    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27712        let avail_len = __input.len();
27713        let mut payload_buf = [0; Self::ENCODED_LEN];
27714        let mut buf = if avail_len < Self::ENCODED_LEN {
27715            payload_buf[0..avail_len].copy_from_slice(__input);
27716            Bytes::new(&payload_buf)
27717        } else {
27718            Bytes::new(__input)
27719        };
27720        let mut __struct = Self::default();
27721        __struct.time_boot_ms = buf.get_u32_le();
27722        __struct.lat_int = buf.get_i32_le();
27723        __struct.lon_int = buf.get_i32_le();
27724        __struct.alt = buf.get_f32_le();
27725        __struct.vx = buf.get_f32_le();
27726        __struct.vy = buf.get_f32_le();
27727        __struct.vz = buf.get_f32_le();
27728        __struct.afx = buf.get_f32_le();
27729        __struct.afy = buf.get_f32_le();
27730        __struct.afz = buf.get_f32_le();
27731        __struct.yaw = buf.get_f32_le();
27732        __struct.yaw_rate = buf.get_f32_le();
27733        let tmp = buf.get_u16_le();
27734        __struct.type_mask = PositionTargetTypemask::from_bits(
27735            tmp & PositionTargetTypemask::all().bits(),
27736        )
27737        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27738            flag_type: "PositionTargetTypemask",
27739            value: tmp as u32,
27740        })?;
27741        let tmp = buf.get_u8();
27742        __struct.coordinate_frame =
27743            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27744                enum_type: "MavFrame",
27745                value: tmp as u32,
27746            })?;
27747        Ok(__struct)
27748    }
27749    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27750        let mut __tmp = BytesMut::new(bytes);
27751        #[allow(clippy::absurd_extreme_comparisons)]
27752        #[allow(unused_comparisons)]
27753        if __tmp.remaining() < Self::ENCODED_LEN {
27754            panic!(
27755                "buffer is too small (need {} bytes, but got {})",
27756                Self::ENCODED_LEN,
27757                __tmp.remaining(),
27758            )
27759        }
27760        __tmp.put_u32_le(self.time_boot_ms);
27761        __tmp.put_i32_le(self.lat_int);
27762        __tmp.put_i32_le(self.lon_int);
27763        __tmp.put_f32_le(self.alt);
27764        __tmp.put_f32_le(self.vx);
27765        __tmp.put_f32_le(self.vy);
27766        __tmp.put_f32_le(self.vz);
27767        __tmp.put_f32_le(self.afx);
27768        __tmp.put_f32_le(self.afy);
27769        __tmp.put_f32_le(self.afz);
27770        __tmp.put_f32_le(self.yaw);
27771        __tmp.put_f32_le(self.yaw_rate);
27772        __tmp.put_u16_le(self.type_mask.bits());
27773        __tmp.put_u8(self.coordinate_frame as u8);
27774        if matches!(version, MavlinkVersion::V2) {
27775            let len = __tmp.len();
27776            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27777        } else {
27778            __tmp.len()
27779        }
27780    }
27781}
27782#[doc = "id: 112"]
27783#[doc = "Camera-IMU triggering and synchronisation message."]
27784#[derive(Debug, Clone, PartialEq)]
27785#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27786#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27787pub struct CAMERA_TRIGGER_DATA {
27788    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27789    pub time_usec: u64,
27790    #[doc = "Image frame sequence"]
27791    pub seq: u32,
27792}
27793impl CAMERA_TRIGGER_DATA {
27794    pub const ENCODED_LEN: usize = 12usize;
27795    pub const DEFAULT: Self = Self {
27796        time_usec: 0_u64,
27797        seq: 0_u32,
27798    };
27799    #[cfg(feature = "arbitrary")]
27800    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27801        use arbitrary::{Arbitrary, Unstructured};
27802        let mut buf = [0u8; 1024];
27803        rng.fill_bytes(&mut buf);
27804        let mut unstructured = Unstructured::new(&buf);
27805        Self::arbitrary(&mut unstructured).unwrap_or_default()
27806    }
27807}
27808impl Default for CAMERA_TRIGGER_DATA {
27809    fn default() -> Self {
27810        Self::DEFAULT.clone()
27811    }
27812}
27813impl MessageData for CAMERA_TRIGGER_DATA {
27814    type Message = MavMessage;
27815    const ID: u32 = 112u32;
27816    const NAME: &'static str = "CAMERA_TRIGGER";
27817    const EXTRA_CRC: u8 = 174u8;
27818    const ENCODED_LEN: usize = 12usize;
27819    fn deser(
27820        _version: MavlinkVersion,
27821        __input: &[u8],
27822    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27823        let avail_len = __input.len();
27824        let mut payload_buf = [0; Self::ENCODED_LEN];
27825        let mut buf = if avail_len < Self::ENCODED_LEN {
27826            payload_buf[0..avail_len].copy_from_slice(__input);
27827            Bytes::new(&payload_buf)
27828        } else {
27829            Bytes::new(__input)
27830        };
27831        let mut __struct = Self::default();
27832        __struct.time_usec = buf.get_u64_le();
27833        __struct.seq = buf.get_u32_le();
27834        Ok(__struct)
27835    }
27836    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27837        let mut __tmp = BytesMut::new(bytes);
27838        #[allow(clippy::absurd_extreme_comparisons)]
27839        #[allow(unused_comparisons)]
27840        if __tmp.remaining() < Self::ENCODED_LEN {
27841            panic!(
27842                "buffer is too small (need {} bytes, but got {})",
27843                Self::ENCODED_LEN,
27844                __tmp.remaining(),
27845            )
27846        }
27847        __tmp.put_u64_le(self.time_usec);
27848        __tmp.put_u32_le(self.seq);
27849        if matches!(version, MavlinkVersion::V2) {
27850            let len = __tmp.len();
27851            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27852        } else {
27853            __tmp.len()
27854        }
27855    }
27856}
27857#[doc = "id: 230"]
27858#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
27859#[derive(Debug, Clone, PartialEq)]
27860#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27861#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27862pub struct ESTIMATOR_STATUS_DATA {
27863    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27864    pub time_usec: u64,
27865    #[doc = "Velocity innovation test ratio"]
27866    pub vel_ratio: f32,
27867    #[doc = "Horizontal position innovation test ratio"]
27868    pub pos_horiz_ratio: f32,
27869    #[doc = "Vertical position innovation test ratio"]
27870    pub pos_vert_ratio: f32,
27871    #[doc = "Magnetometer innovation test ratio"]
27872    pub mag_ratio: f32,
27873    #[doc = "Height above terrain innovation test ratio"]
27874    pub hagl_ratio: f32,
27875    #[doc = "True airspeed innovation test ratio"]
27876    pub tas_ratio: f32,
27877    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
27878    pub pos_horiz_accuracy: f32,
27879    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
27880    pub pos_vert_accuracy: f32,
27881    #[doc = "Bitmap indicating which EKF outputs are valid."]
27882    pub flags: EstimatorStatusFlags,
27883}
27884impl ESTIMATOR_STATUS_DATA {
27885    pub const ENCODED_LEN: usize = 42usize;
27886    pub const DEFAULT: Self = Self {
27887        time_usec: 0_u64,
27888        vel_ratio: 0.0_f32,
27889        pos_horiz_ratio: 0.0_f32,
27890        pos_vert_ratio: 0.0_f32,
27891        mag_ratio: 0.0_f32,
27892        hagl_ratio: 0.0_f32,
27893        tas_ratio: 0.0_f32,
27894        pos_horiz_accuracy: 0.0_f32,
27895        pos_vert_accuracy: 0.0_f32,
27896        flags: EstimatorStatusFlags::DEFAULT,
27897    };
27898    #[cfg(feature = "arbitrary")]
27899    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27900        use arbitrary::{Arbitrary, Unstructured};
27901        let mut buf = [0u8; 1024];
27902        rng.fill_bytes(&mut buf);
27903        let mut unstructured = Unstructured::new(&buf);
27904        Self::arbitrary(&mut unstructured).unwrap_or_default()
27905    }
27906}
27907impl Default for ESTIMATOR_STATUS_DATA {
27908    fn default() -> Self {
27909        Self::DEFAULT.clone()
27910    }
27911}
27912impl MessageData for ESTIMATOR_STATUS_DATA {
27913    type Message = MavMessage;
27914    const ID: u32 = 230u32;
27915    const NAME: &'static str = "ESTIMATOR_STATUS";
27916    const EXTRA_CRC: u8 = 163u8;
27917    const ENCODED_LEN: usize = 42usize;
27918    fn deser(
27919        _version: MavlinkVersion,
27920        __input: &[u8],
27921    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27922        let avail_len = __input.len();
27923        let mut payload_buf = [0; Self::ENCODED_LEN];
27924        let mut buf = if avail_len < Self::ENCODED_LEN {
27925            payload_buf[0..avail_len].copy_from_slice(__input);
27926            Bytes::new(&payload_buf)
27927        } else {
27928            Bytes::new(__input)
27929        };
27930        let mut __struct = Self::default();
27931        __struct.time_usec = buf.get_u64_le();
27932        __struct.vel_ratio = buf.get_f32_le();
27933        __struct.pos_horiz_ratio = buf.get_f32_le();
27934        __struct.pos_vert_ratio = buf.get_f32_le();
27935        __struct.mag_ratio = buf.get_f32_le();
27936        __struct.hagl_ratio = buf.get_f32_le();
27937        __struct.tas_ratio = buf.get_f32_le();
27938        __struct.pos_horiz_accuracy = buf.get_f32_le();
27939        __struct.pos_vert_accuracy = buf.get_f32_le();
27940        let tmp = buf.get_u16_le();
27941        __struct.flags = EstimatorStatusFlags::from_bits(tmp & EstimatorStatusFlags::all().bits())
27942            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27943                flag_type: "EstimatorStatusFlags",
27944                value: tmp as u32,
27945            })?;
27946        Ok(__struct)
27947    }
27948    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27949        let mut __tmp = BytesMut::new(bytes);
27950        #[allow(clippy::absurd_extreme_comparisons)]
27951        #[allow(unused_comparisons)]
27952        if __tmp.remaining() < Self::ENCODED_LEN {
27953            panic!(
27954                "buffer is too small (need {} bytes, but got {})",
27955                Self::ENCODED_LEN,
27956                __tmp.remaining(),
27957            )
27958        }
27959        __tmp.put_u64_le(self.time_usec);
27960        __tmp.put_f32_le(self.vel_ratio);
27961        __tmp.put_f32_le(self.pos_horiz_ratio);
27962        __tmp.put_f32_le(self.pos_vert_ratio);
27963        __tmp.put_f32_le(self.mag_ratio);
27964        __tmp.put_f32_le(self.hagl_ratio);
27965        __tmp.put_f32_le(self.tas_ratio);
27966        __tmp.put_f32_le(self.pos_horiz_accuracy);
27967        __tmp.put_f32_le(self.pos_vert_accuracy);
27968        __tmp.put_u16_le(self.flags.bits());
27969        if matches!(version, MavlinkVersion::V2) {
27970            let len = __tmp.len();
27971            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27972        } else {
27973            __tmp.len()
27974        }
27975    }
27976}
27977#[doc = "id: 100"]
27978#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
27979#[derive(Debug, Clone, PartialEq)]
27980#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27981#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27982pub struct OPTICAL_FLOW_DATA {
27983    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27984    pub time_usec: u64,
27985    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
27986    pub flow_comp_m_x: f32,
27987    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
27988    pub flow_comp_m_y: f32,
27989    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
27990    pub ground_distance: f32,
27991    #[doc = "Flow in x-sensor direction"]
27992    pub flow_x: i16,
27993    #[doc = "Flow in y-sensor direction"]
27994    pub flow_y: i16,
27995    #[doc = "Sensor ID"]
27996    pub sensor_id: u8,
27997    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
27998    pub quality: u8,
27999    #[doc = "Flow rate about X axis"]
28000    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28001    pub flow_rate_x: f32,
28002    #[doc = "Flow rate about Y axis"]
28003    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28004    pub flow_rate_y: f32,
28005}
28006impl OPTICAL_FLOW_DATA {
28007    pub const ENCODED_LEN: usize = 34usize;
28008    pub const DEFAULT: Self = Self {
28009        time_usec: 0_u64,
28010        flow_comp_m_x: 0.0_f32,
28011        flow_comp_m_y: 0.0_f32,
28012        ground_distance: 0.0_f32,
28013        flow_x: 0_i16,
28014        flow_y: 0_i16,
28015        sensor_id: 0_u8,
28016        quality: 0_u8,
28017        flow_rate_x: 0.0_f32,
28018        flow_rate_y: 0.0_f32,
28019    };
28020    #[cfg(feature = "arbitrary")]
28021    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28022        use arbitrary::{Arbitrary, Unstructured};
28023        let mut buf = [0u8; 1024];
28024        rng.fill_bytes(&mut buf);
28025        let mut unstructured = Unstructured::new(&buf);
28026        Self::arbitrary(&mut unstructured).unwrap_or_default()
28027    }
28028}
28029impl Default for OPTICAL_FLOW_DATA {
28030    fn default() -> Self {
28031        Self::DEFAULT.clone()
28032    }
28033}
28034impl MessageData for OPTICAL_FLOW_DATA {
28035    type Message = MavMessage;
28036    const ID: u32 = 100u32;
28037    const NAME: &'static str = "OPTICAL_FLOW";
28038    const EXTRA_CRC: u8 = 175u8;
28039    const ENCODED_LEN: usize = 34usize;
28040    fn deser(
28041        _version: MavlinkVersion,
28042        __input: &[u8],
28043    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28044        let avail_len = __input.len();
28045        let mut payload_buf = [0; Self::ENCODED_LEN];
28046        let mut buf = if avail_len < Self::ENCODED_LEN {
28047            payload_buf[0..avail_len].copy_from_slice(__input);
28048            Bytes::new(&payload_buf)
28049        } else {
28050            Bytes::new(__input)
28051        };
28052        let mut __struct = Self::default();
28053        __struct.time_usec = buf.get_u64_le();
28054        __struct.flow_comp_m_x = buf.get_f32_le();
28055        __struct.flow_comp_m_y = buf.get_f32_le();
28056        __struct.ground_distance = buf.get_f32_le();
28057        __struct.flow_x = buf.get_i16_le();
28058        __struct.flow_y = buf.get_i16_le();
28059        __struct.sensor_id = buf.get_u8();
28060        __struct.quality = buf.get_u8();
28061        __struct.flow_rate_x = buf.get_f32_le();
28062        __struct.flow_rate_y = buf.get_f32_le();
28063        Ok(__struct)
28064    }
28065    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28066        let mut __tmp = BytesMut::new(bytes);
28067        #[allow(clippy::absurd_extreme_comparisons)]
28068        #[allow(unused_comparisons)]
28069        if __tmp.remaining() < Self::ENCODED_LEN {
28070            panic!(
28071                "buffer is too small (need {} bytes, but got {})",
28072                Self::ENCODED_LEN,
28073                __tmp.remaining(),
28074            )
28075        }
28076        __tmp.put_u64_le(self.time_usec);
28077        __tmp.put_f32_le(self.flow_comp_m_x);
28078        __tmp.put_f32_le(self.flow_comp_m_y);
28079        __tmp.put_f32_le(self.ground_distance);
28080        __tmp.put_i16_le(self.flow_x);
28081        __tmp.put_i16_le(self.flow_y);
28082        __tmp.put_u8(self.sensor_id);
28083        __tmp.put_u8(self.quality);
28084        __tmp.put_f32_le(self.flow_rate_x);
28085        __tmp.put_f32_le(self.flow_rate_y);
28086        if matches!(version, MavlinkVersion::V2) {
28087            let len = __tmp.len();
28088            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28089        } else {
28090            __tmp.len()
28091        }
28092    }
28093}
28094#[doc = "id: 40"]
28095#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
28096#[derive(Debug, Clone, PartialEq)]
28097#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28098#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28099pub struct MISSION_REQUEST_DATA {
28100    #[doc = "Sequence"]
28101    pub seq: u16,
28102    #[doc = "System ID"]
28103    pub target_system: u8,
28104    #[doc = "Component ID"]
28105    pub target_component: u8,
28106    #[doc = "Mission type."]
28107    #[cfg_attr(feature = "serde", serde(default))]
28108    pub mission_type: MavMissionType,
28109}
28110impl MISSION_REQUEST_DATA {
28111    pub const ENCODED_LEN: usize = 5usize;
28112    pub const DEFAULT: Self = Self {
28113        seq: 0_u16,
28114        target_system: 0_u8,
28115        target_component: 0_u8,
28116        mission_type: MavMissionType::DEFAULT,
28117    };
28118    #[cfg(feature = "arbitrary")]
28119    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28120        use arbitrary::{Arbitrary, Unstructured};
28121        let mut buf = [0u8; 1024];
28122        rng.fill_bytes(&mut buf);
28123        let mut unstructured = Unstructured::new(&buf);
28124        Self::arbitrary(&mut unstructured).unwrap_or_default()
28125    }
28126}
28127impl Default for MISSION_REQUEST_DATA {
28128    fn default() -> Self {
28129        Self::DEFAULT.clone()
28130    }
28131}
28132impl MessageData for MISSION_REQUEST_DATA {
28133    type Message = MavMessage;
28134    const ID: u32 = 40u32;
28135    const NAME: &'static str = "MISSION_REQUEST";
28136    const EXTRA_CRC: u8 = 230u8;
28137    const ENCODED_LEN: usize = 5usize;
28138    fn deser(
28139        _version: MavlinkVersion,
28140        __input: &[u8],
28141    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28142        let avail_len = __input.len();
28143        let mut payload_buf = [0; Self::ENCODED_LEN];
28144        let mut buf = if avail_len < Self::ENCODED_LEN {
28145            payload_buf[0..avail_len].copy_from_slice(__input);
28146            Bytes::new(&payload_buf)
28147        } else {
28148            Bytes::new(__input)
28149        };
28150        let mut __struct = Self::default();
28151        __struct.seq = buf.get_u16_le();
28152        __struct.target_system = buf.get_u8();
28153        __struct.target_component = buf.get_u8();
28154        let tmp = buf.get_u8();
28155        __struct.mission_type =
28156            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28157                enum_type: "MavMissionType",
28158                value: tmp as u32,
28159            })?;
28160        Ok(__struct)
28161    }
28162    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28163        let mut __tmp = BytesMut::new(bytes);
28164        #[allow(clippy::absurd_extreme_comparisons)]
28165        #[allow(unused_comparisons)]
28166        if __tmp.remaining() < Self::ENCODED_LEN {
28167            panic!(
28168                "buffer is too small (need {} bytes, but got {})",
28169                Self::ENCODED_LEN,
28170                __tmp.remaining(),
28171            )
28172        }
28173        __tmp.put_u16_le(self.seq);
28174        __tmp.put_u8(self.target_system);
28175        __tmp.put_u8(self.target_component);
28176        __tmp.put_u8(self.mission_type as u8);
28177        if matches!(version, MavlinkVersion::V2) {
28178            let len = __tmp.len();
28179            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28180        } else {
28181            __tmp.len()
28182        }
28183    }
28184}
28185#[doc = "id: 64"]
28186#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
28187#[derive(Debug, Clone, PartialEq)]
28188#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28189#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28190pub struct LOCAL_POSITION_NED_COV_DATA {
28191    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28192    pub time_usec: u64,
28193    #[doc = "X Position"]
28194    pub x: f32,
28195    #[doc = "Y Position"]
28196    pub y: f32,
28197    #[doc = "Z Position"]
28198    pub z: f32,
28199    #[doc = "X Speed"]
28200    pub vx: f32,
28201    #[doc = "Y Speed"]
28202    pub vy: f32,
28203    #[doc = "Z Speed"]
28204    pub vz: f32,
28205    #[doc = "X Acceleration"]
28206    pub ax: f32,
28207    #[doc = "Y Acceleration"]
28208    pub ay: f32,
28209    #[doc = "Z Acceleration"]
28210    pub az: f32,
28211    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
28212    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28213    pub covariance: [f32; 45],
28214    #[doc = "Class id of the estimator this estimate originated from."]
28215    pub estimator_type: MavEstimatorType,
28216}
28217impl LOCAL_POSITION_NED_COV_DATA {
28218    pub const ENCODED_LEN: usize = 225usize;
28219    pub const DEFAULT: Self = Self {
28220        time_usec: 0_u64,
28221        x: 0.0_f32,
28222        y: 0.0_f32,
28223        z: 0.0_f32,
28224        vx: 0.0_f32,
28225        vy: 0.0_f32,
28226        vz: 0.0_f32,
28227        ax: 0.0_f32,
28228        ay: 0.0_f32,
28229        az: 0.0_f32,
28230        covariance: [0.0_f32; 45usize],
28231        estimator_type: MavEstimatorType::DEFAULT,
28232    };
28233    #[cfg(feature = "arbitrary")]
28234    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28235        use arbitrary::{Arbitrary, Unstructured};
28236        let mut buf = [0u8; 1024];
28237        rng.fill_bytes(&mut buf);
28238        let mut unstructured = Unstructured::new(&buf);
28239        Self::arbitrary(&mut unstructured).unwrap_or_default()
28240    }
28241}
28242impl Default for LOCAL_POSITION_NED_COV_DATA {
28243    fn default() -> Self {
28244        Self::DEFAULT.clone()
28245    }
28246}
28247impl MessageData for LOCAL_POSITION_NED_COV_DATA {
28248    type Message = MavMessage;
28249    const ID: u32 = 64u32;
28250    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
28251    const EXTRA_CRC: u8 = 191u8;
28252    const ENCODED_LEN: usize = 225usize;
28253    fn deser(
28254        _version: MavlinkVersion,
28255        __input: &[u8],
28256    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28257        let avail_len = __input.len();
28258        let mut payload_buf = [0; Self::ENCODED_LEN];
28259        let mut buf = if avail_len < Self::ENCODED_LEN {
28260            payload_buf[0..avail_len].copy_from_slice(__input);
28261            Bytes::new(&payload_buf)
28262        } else {
28263            Bytes::new(__input)
28264        };
28265        let mut __struct = Self::default();
28266        __struct.time_usec = buf.get_u64_le();
28267        __struct.x = buf.get_f32_le();
28268        __struct.y = buf.get_f32_le();
28269        __struct.z = buf.get_f32_le();
28270        __struct.vx = buf.get_f32_le();
28271        __struct.vy = buf.get_f32_le();
28272        __struct.vz = buf.get_f32_le();
28273        __struct.ax = buf.get_f32_le();
28274        __struct.ay = buf.get_f32_le();
28275        __struct.az = buf.get_f32_le();
28276        for v in &mut __struct.covariance {
28277            let val = buf.get_f32_le();
28278            *v = val;
28279        }
28280        let tmp = buf.get_u8();
28281        __struct.estimator_type =
28282            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28283                enum_type: "MavEstimatorType",
28284                value: tmp as u32,
28285            })?;
28286        Ok(__struct)
28287    }
28288    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28289        let mut __tmp = BytesMut::new(bytes);
28290        #[allow(clippy::absurd_extreme_comparisons)]
28291        #[allow(unused_comparisons)]
28292        if __tmp.remaining() < Self::ENCODED_LEN {
28293            panic!(
28294                "buffer is too small (need {} bytes, but got {})",
28295                Self::ENCODED_LEN,
28296                __tmp.remaining(),
28297            )
28298        }
28299        __tmp.put_u64_le(self.time_usec);
28300        __tmp.put_f32_le(self.x);
28301        __tmp.put_f32_le(self.y);
28302        __tmp.put_f32_le(self.z);
28303        __tmp.put_f32_le(self.vx);
28304        __tmp.put_f32_le(self.vy);
28305        __tmp.put_f32_le(self.vz);
28306        __tmp.put_f32_le(self.ax);
28307        __tmp.put_f32_le(self.ay);
28308        __tmp.put_f32_le(self.az);
28309        for val in &self.covariance {
28310            __tmp.put_f32_le(*val);
28311        }
28312        __tmp.put_u8(self.estimator_type as u8);
28313        if matches!(version, MavlinkVersion::V2) {
28314            let len = __tmp.len();
28315            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28316        } else {
28317            __tmp.len()
28318        }
28319    }
28320}
28321#[doc = "id: 132"]
28322#[doc = "Distance sensor information for an onboard rangefinder."]
28323#[derive(Debug, Clone, PartialEq)]
28324#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28325#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28326pub struct DISTANCE_SENSOR_DATA {
28327    #[doc = "Timestamp (time since system boot)."]
28328    pub time_boot_ms: u32,
28329    #[doc = "Minimum distance the sensor can measure"]
28330    pub min_distance: u16,
28331    #[doc = "Maximum distance the sensor can measure"]
28332    pub max_distance: u16,
28333    #[doc = "Current distance reading"]
28334    pub current_distance: u16,
28335    #[doc = "Type of distance sensor."]
28336    pub mavtype: MavDistanceSensor,
28337    #[doc = "Onboard ID of the sensor"]
28338    pub id: u8,
28339    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
28340    pub orientation: MavSensorOrientation,
28341    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
28342    pub covariance: u8,
28343    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
28344    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28345    pub horizontal_fov: f32,
28346    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
28347    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28348    pub vertical_fov: f32,
28349    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
28350    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28351    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28352    pub quaternion: [f32; 4],
28353    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
28354    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28355    pub signal_quality: u8,
28356}
28357impl DISTANCE_SENSOR_DATA {
28358    pub const ENCODED_LEN: usize = 39usize;
28359    pub const DEFAULT: Self = Self {
28360        time_boot_ms: 0_u32,
28361        min_distance: 0_u16,
28362        max_distance: 0_u16,
28363        current_distance: 0_u16,
28364        mavtype: MavDistanceSensor::DEFAULT,
28365        id: 0_u8,
28366        orientation: MavSensorOrientation::DEFAULT,
28367        covariance: 0_u8,
28368        horizontal_fov: 0.0_f32,
28369        vertical_fov: 0.0_f32,
28370        quaternion: [0.0_f32; 4usize],
28371        signal_quality: 0_u8,
28372    };
28373    #[cfg(feature = "arbitrary")]
28374    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28375        use arbitrary::{Arbitrary, Unstructured};
28376        let mut buf = [0u8; 1024];
28377        rng.fill_bytes(&mut buf);
28378        let mut unstructured = Unstructured::new(&buf);
28379        Self::arbitrary(&mut unstructured).unwrap_or_default()
28380    }
28381}
28382impl Default for DISTANCE_SENSOR_DATA {
28383    fn default() -> Self {
28384        Self::DEFAULT.clone()
28385    }
28386}
28387impl MessageData for DISTANCE_SENSOR_DATA {
28388    type Message = MavMessage;
28389    const ID: u32 = 132u32;
28390    const NAME: &'static str = "DISTANCE_SENSOR";
28391    const EXTRA_CRC: u8 = 85u8;
28392    const ENCODED_LEN: usize = 39usize;
28393    fn deser(
28394        _version: MavlinkVersion,
28395        __input: &[u8],
28396    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28397        let avail_len = __input.len();
28398        let mut payload_buf = [0; Self::ENCODED_LEN];
28399        let mut buf = if avail_len < Self::ENCODED_LEN {
28400            payload_buf[0..avail_len].copy_from_slice(__input);
28401            Bytes::new(&payload_buf)
28402        } else {
28403            Bytes::new(__input)
28404        };
28405        let mut __struct = Self::default();
28406        __struct.time_boot_ms = buf.get_u32_le();
28407        __struct.min_distance = buf.get_u16_le();
28408        __struct.max_distance = buf.get_u16_le();
28409        __struct.current_distance = buf.get_u16_le();
28410        let tmp = buf.get_u8();
28411        __struct.mavtype =
28412            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28413                enum_type: "MavDistanceSensor",
28414                value: tmp as u32,
28415            })?;
28416        __struct.id = buf.get_u8();
28417        let tmp = buf.get_u8();
28418        __struct.orientation =
28419            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28420                enum_type: "MavSensorOrientation",
28421                value: tmp as u32,
28422            })?;
28423        __struct.covariance = buf.get_u8();
28424        __struct.horizontal_fov = buf.get_f32_le();
28425        __struct.vertical_fov = buf.get_f32_le();
28426        for v in &mut __struct.quaternion {
28427            let val = buf.get_f32_le();
28428            *v = val;
28429        }
28430        __struct.signal_quality = buf.get_u8();
28431        Ok(__struct)
28432    }
28433    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28434        let mut __tmp = BytesMut::new(bytes);
28435        #[allow(clippy::absurd_extreme_comparisons)]
28436        #[allow(unused_comparisons)]
28437        if __tmp.remaining() < Self::ENCODED_LEN {
28438            panic!(
28439                "buffer is too small (need {} bytes, but got {})",
28440                Self::ENCODED_LEN,
28441                __tmp.remaining(),
28442            )
28443        }
28444        __tmp.put_u32_le(self.time_boot_ms);
28445        __tmp.put_u16_le(self.min_distance);
28446        __tmp.put_u16_le(self.max_distance);
28447        __tmp.put_u16_le(self.current_distance);
28448        __tmp.put_u8(self.mavtype as u8);
28449        __tmp.put_u8(self.id);
28450        __tmp.put_u8(self.orientation as u8);
28451        __tmp.put_u8(self.covariance);
28452        __tmp.put_f32_le(self.horizontal_fov);
28453        __tmp.put_f32_le(self.vertical_fov);
28454        for val in &self.quaternion {
28455            __tmp.put_f32_le(*val);
28456        }
28457        __tmp.put_u8(self.signal_quality);
28458        if matches!(version, MavlinkVersion::V2) {
28459            let len = __tmp.len();
28460            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28461        } else {
28462            __tmp.len()
28463        }
28464    }
28465}
28466#[doc = "id: 310"]
28467#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
28468#[derive(Debug, Clone, PartialEq)]
28469#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28470#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28471pub struct UAVCAN_NODE_STATUS_DATA {
28472    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28473    pub time_usec: u64,
28474    #[doc = "Time since the start-up of the node."]
28475    pub uptime_sec: u32,
28476    #[doc = "Vendor-specific status information."]
28477    pub vendor_specific_status_code: u16,
28478    #[doc = "Generalized node health status."]
28479    pub health: UavcanNodeHealth,
28480    #[doc = "Generalized operating mode."]
28481    pub mode: UavcanNodeMode,
28482    #[doc = "Not used currently."]
28483    pub sub_mode: u8,
28484}
28485impl UAVCAN_NODE_STATUS_DATA {
28486    pub const ENCODED_LEN: usize = 17usize;
28487    pub const DEFAULT: Self = Self {
28488        time_usec: 0_u64,
28489        uptime_sec: 0_u32,
28490        vendor_specific_status_code: 0_u16,
28491        health: UavcanNodeHealth::DEFAULT,
28492        mode: UavcanNodeMode::DEFAULT,
28493        sub_mode: 0_u8,
28494    };
28495    #[cfg(feature = "arbitrary")]
28496    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28497        use arbitrary::{Arbitrary, Unstructured};
28498        let mut buf = [0u8; 1024];
28499        rng.fill_bytes(&mut buf);
28500        let mut unstructured = Unstructured::new(&buf);
28501        Self::arbitrary(&mut unstructured).unwrap_or_default()
28502    }
28503}
28504impl Default for UAVCAN_NODE_STATUS_DATA {
28505    fn default() -> Self {
28506        Self::DEFAULT.clone()
28507    }
28508}
28509impl MessageData for UAVCAN_NODE_STATUS_DATA {
28510    type Message = MavMessage;
28511    const ID: u32 = 310u32;
28512    const NAME: &'static str = "UAVCAN_NODE_STATUS";
28513    const EXTRA_CRC: u8 = 28u8;
28514    const ENCODED_LEN: usize = 17usize;
28515    fn deser(
28516        _version: MavlinkVersion,
28517        __input: &[u8],
28518    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28519        let avail_len = __input.len();
28520        let mut payload_buf = [0; Self::ENCODED_LEN];
28521        let mut buf = if avail_len < Self::ENCODED_LEN {
28522            payload_buf[0..avail_len].copy_from_slice(__input);
28523            Bytes::new(&payload_buf)
28524        } else {
28525            Bytes::new(__input)
28526        };
28527        let mut __struct = Self::default();
28528        __struct.time_usec = buf.get_u64_le();
28529        __struct.uptime_sec = buf.get_u32_le();
28530        __struct.vendor_specific_status_code = buf.get_u16_le();
28531        let tmp = buf.get_u8();
28532        __struct.health =
28533            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28534                enum_type: "UavcanNodeHealth",
28535                value: tmp as u32,
28536            })?;
28537        let tmp = buf.get_u8();
28538        __struct.mode =
28539            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28540                enum_type: "UavcanNodeMode",
28541                value: tmp as u32,
28542            })?;
28543        __struct.sub_mode = buf.get_u8();
28544        Ok(__struct)
28545    }
28546    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28547        let mut __tmp = BytesMut::new(bytes);
28548        #[allow(clippy::absurd_extreme_comparisons)]
28549        #[allow(unused_comparisons)]
28550        if __tmp.remaining() < Self::ENCODED_LEN {
28551            panic!(
28552                "buffer is too small (need {} bytes, but got {})",
28553                Self::ENCODED_LEN,
28554                __tmp.remaining(),
28555            )
28556        }
28557        __tmp.put_u64_le(self.time_usec);
28558        __tmp.put_u32_le(self.uptime_sec);
28559        __tmp.put_u16_le(self.vendor_specific_status_code);
28560        __tmp.put_u8(self.health as u8);
28561        __tmp.put_u8(self.mode as u8);
28562        __tmp.put_u8(self.sub_mode);
28563        if matches!(version, MavlinkVersion::V2) {
28564            let len = __tmp.len();
28565            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28566        } else {
28567            __tmp.len()
28568        }
28569    }
28570}
28571#[doc = "id: 69"]
28572#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
28573#[derive(Debug, Clone, PartialEq)]
28574#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28575#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28576pub struct MANUAL_CONTROL_DATA {
28577    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
28578    pub x: i16,
28579    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
28580    pub y: i16,
28581    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
28582    pub z: i16,
28583    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
28584    pub r: i16,
28585    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
28586    pub buttons: u16,
28587    #[doc = "The system to be controlled."]
28588    pub target: u8,
28589    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
28590    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28591    pub buttons2: u16,
28592    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
28593    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28594    pub enabled_extensions: u8,
28595    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
28596    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28597    pub s: i16,
28598    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
28599    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28600    pub t: i16,
28601    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
28602    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28603    pub aux1: i16,
28604    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
28605    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28606    pub aux2: i16,
28607    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
28608    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28609    pub aux3: i16,
28610    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
28611    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28612    pub aux4: i16,
28613    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
28614    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28615    pub aux5: i16,
28616    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
28617    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28618    pub aux6: i16,
28619}
28620impl MANUAL_CONTROL_DATA {
28621    pub const ENCODED_LEN: usize = 30usize;
28622    pub const DEFAULT: Self = Self {
28623        x: 0_i16,
28624        y: 0_i16,
28625        z: 0_i16,
28626        r: 0_i16,
28627        buttons: 0_u16,
28628        target: 0_u8,
28629        buttons2: 0_u16,
28630        enabled_extensions: 0_u8,
28631        s: 0_i16,
28632        t: 0_i16,
28633        aux1: 0_i16,
28634        aux2: 0_i16,
28635        aux3: 0_i16,
28636        aux4: 0_i16,
28637        aux5: 0_i16,
28638        aux6: 0_i16,
28639    };
28640    #[cfg(feature = "arbitrary")]
28641    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28642        use arbitrary::{Arbitrary, Unstructured};
28643        let mut buf = [0u8; 1024];
28644        rng.fill_bytes(&mut buf);
28645        let mut unstructured = Unstructured::new(&buf);
28646        Self::arbitrary(&mut unstructured).unwrap_or_default()
28647    }
28648}
28649impl Default for MANUAL_CONTROL_DATA {
28650    fn default() -> Self {
28651        Self::DEFAULT.clone()
28652    }
28653}
28654impl MessageData for MANUAL_CONTROL_DATA {
28655    type Message = MavMessage;
28656    const ID: u32 = 69u32;
28657    const NAME: &'static str = "MANUAL_CONTROL";
28658    const EXTRA_CRC: u8 = 243u8;
28659    const ENCODED_LEN: usize = 30usize;
28660    fn deser(
28661        _version: MavlinkVersion,
28662        __input: &[u8],
28663    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28664        let avail_len = __input.len();
28665        let mut payload_buf = [0; Self::ENCODED_LEN];
28666        let mut buf = if avail_len < Self::ENCODED_LEN {
28667            payload_buf[0..avail_len].copy_from_slice(__input);
28668            Bytes::new(&payload_buf)
28669        } else {
28670            Bytes::new(__input)
28671        };
28672        let mut __struct = Self::default();
28673        __struct.x = buf.get_i16_le();
28674        __struct.y = buf.get_i16_le();
28675        __struct.z = buf.get_i16_le();
28676        __struct.r = buf.get_i16_le();
28677        __struct.buttons = buf.get_u16_le();
28678        __struct.target = buf.get_u8();
28679        __struct.buttons2 = buf.get_u16_le();
28680        __struct.enabled_extensions = buf.get_u8();
28681        __struct.s = buf.get_i16_le();
28682        __struct.t = buf.get_i16_le();
28683        __struct.aux1 = buf.get_i16_le();
28684        __struct.aux2 = buf.get_i16_le();
28685        __struct.aux3 = buf.get_i16_le();
28686        __struct.aux4 = buf.get_i16_le();
28687        __struct.aux5 = buf.get_i16_le();
28688        __struct.aux6 = buf.get_i16_le();
28689        Ok(__struct)
28690    }
28691    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28692        let mut __tmp = BytesMut::new(bytes);
28693        #[allow(clippy::absurd_extreme_comparisons)]
28694        #[allow(unused_comparisons)]
28695        if __tmp.remaining() < Self::ENCODED_LEN {
28696            panic!(
28697                "buffer is too small (need {} bytes, but got {})",
28698                Self::ENCODED_LEN,
28699                __tmp.remaining(),
28700            )
28701        }
28702        __tmp.put_i16_le(self.x);
28703        __tmp.put_i16_le(self.y);
28704        __tmp.put_i16_le(self.z);
28705        __tmp.put_i16_le(self.r);
28706        __tmp.put_u16_le(self.buttons);
28707        __tmp.put_u8(self.target);
28708        __tmp.put_u16_le(self.buttons2);
28709        __tmp.put_u8(self.enabled_extensions);
28710        __tmp.put_i16_le(self.s);
28711        __tmp.put_i16_le(self.t);
28712        __tmp.put_i16_le(self.aux1);
28713        __tmp.put_i16_le(self.aux2);
28714        __tmp.put_i16_le(self.aux3);
28715        __tmp.put_i16_le(self.aux4);
28716        __tmp.put_i16_le(self.aux5);
28717        __tmp.put_i16_le(self.aux6);
28718        if matches!(version, MavlinkVersion::V2) {
28719            let len = __tmp.len();
28720            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28721        } else {
28722            __tmp.len()
28723        }
28724    }
28725}
28726#[doc = "id: 9005"]
28727#[doc = "Winch status."]
28728#[derive(Debug, Clone, PartialEq)]
28729#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28730#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28731pub struct WINCH_STATUS_DATA {
28732    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
28733    pub time_usec: u64,
28734    #[doc = "Length of line released. NaN if unknown"]
28735    pub line_length: f32,
28736    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
28737    pub speed: f32,
28738    #[doc = "Tension on the line. NaN if unknown"]
28739    pub tension: f32,
28740    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
28741    pub voltage: f32,
28742    #[doc = "Current draw from the winch. NaN if unknown"]
28743    pub current: f32,
28744    #[doc = "Status flags"]
28745    pub status: MavWinchStatusFlag,
28746    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
28747    pub temperature: i16,
28748}
28749impl WINCH_STATUS_DATA {
28750    pub const ENCODED_LEN: usize = 34usize;
28751    pub const DEFAULT: Self = Self {
28752        time_usec: 0_u64,
28753        line_length: 0.0_f32,
28754        speed: 0.0_f32,
28755        tension: 0.0_f32,
28756        voltage: 0.0_f32,
28757        current: 0.0_f32,
28758        status: MavWinchStatusFlag::DEFAULT,
28759        temperature: 0_i16,
28760    };
28761    #[cfg(feature = "arbitrary")]
28762    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28763        use arbitrary::{Arbitrary, Unstructured};
28764        let mut buf = [0u8; 1024];
28765        rng.fill_bytes(&mut buf);
28766        let mut unstructured = Unstructured::new(&buf);
28767        Self::arbitrary(&mut unstructured).unwrap_or_default()
28768    }
28769}
28770impl Default for WINCH_STATUS_DATA {
28771    fn default() -> Self {
28772        Self::DEFAULT.clone()
28773    }
28774}
28775impl MessageData for WINCH_STATUS_DATA {
28776    type Message = MavMessage;
28777    const ID: u32 = 9005u32;
28778    const NAME: &'static str = "WINCH_STATUS";
28779    const EXTRA_CRC: u8 = 117u8;
28780    const ENCODED_LEN: usize = 34usize;
28781    fn deser(
28782        _version: MavlinkVersion,
28783        __input: &[u8],
28784    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28785        let avail_len = __input.len();
28786        let mut payload_buf = [0; Self::ENCODED_LEN];
28787        let mut buf = if avail_len < Self::ENCODED_LEN {
28788            payload_buf[0..avail_len].copy_from_slice(__input);
28789            Bytes::new(&payload_buf)
28790        } else {
28791            Bytes::new(__input)
28792        };
28793        let mut __struct = Self::default();
28794        __struct.time_usec = buf.get_u64_le();
28795        __struct.line_length = buf.get_f32_le();
28796        __struct.speed = buf.get_f32_le();
28797        __struct.tension = buf.get_f32_le();
28798        __struct.voltage = buf.get_f32_le();
28799        __struct.current = buf.get_f32_le();
28800        let tmp = buf.get_u32_le();
28801        __struct.status = MavWinchStatusFlag::from_bits(tmp & MavWinchStatusFlag::all().bits())
28802            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28803                flag_type: "MavWinchStatusFlag",
28804                value: tmp as u32,
28805            })?;
28806        __struct.temperature = buf.get_i16_le();
28807        Ok(__struct)
28808    }
28809    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28810        let mut __tmp = BytesMut::new(bytes);
28811        #[allow(clippy::absurd_extreme_comparisons)]
28812        #[allow(unused_comparisons)]
28813        if __tmp.remaining() < Self::ENCODED_LEN {
28814            panic!(
28815                "buffer is too small (need {} bytes, but got {})",
28816                Self::ENCODED_LEN,
28817                __tmp.remaining(),
28818            )
28819        }
28820        __tmp.put_u64_le(self.time_usec);
28821        __tmp.put_f32_le(self.line_length);
28822        __tmp.put_f32_le(self.speed);
28823        __tmp.put_f32_le(self.tension);
28824        __tmp.put_f32_le(self.voltage);
28825        __tmp.put_f32_le(self.current);
28826        __tmp.put_u32_le(self.status.bits());
28827        __tmp.put_i16_le(self.temperature);
28828        if matches!(version, MavlinkVersion::V2) {
28829            let len = __tmp.len();
28830            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28831        } else {
28832            __tmp.len()
28833        }
28834    }
28835}
28836#[doc = "id: 47"]
28837#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
28838#[derive(Debug, Clone, PartialEq)]
28839#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28840#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28841pub struct MISSION_ACK_DATA {
28842    #[doc = "System ID"]
28843    pub target_system: u8,
28844    #[doc = "Component ID"]
28845    pub target_component: u8,
28846    #[doc = "Mission result."]
28847    pub mavtype: MavMissionResult,
28848    #[doc = "Mission type."]
28849    #[cfg_attr(feature = "serde", serde(default))]
28850    pub mission_type: MavMissionType,
28851    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
28852    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28853    pub opaque_id: u32,
28854}
28855impl MISSION_ACK_DATA {
28856    pub const ENCODED_LEN: usize = 8usize;
28857    pub const DEFAULT: Self = Self {
28858        target_system: 0_u8,
28859        target_component: 0_u8,
28860        mavtype: MavMissionResult::DEFAULT,
28861        mission_type: MavMissionType::DEFAULT,
28862        opaque_id: 0_u32,
28863    };
28864    #[cfg(feature = "arbitrary")]
28865    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28866        use arbitrary::{Arbitrary, Unstructured};
28867        let mut buf = [0u8; 1024];
28868        rng.fill_bytes(&mut buf);
28869        let mut unstructured = Unstructured::new(&buf);
28870        Self::arbitrary(&mut unstructured).unwrap_or_default()
28871    }
28872}
28873impl Default for MISSION_ACK_DATA {
28874    fn default() -> Self {
28875        Self::DEFAULT.clone()
28876    }
28877}
28878impl MessageData for MISSION_ACK_DATA {
28879    type Message = MavMessage;
28880    const ID: u32 = 47u32;
28881    const NAME: &'static str = "MISSION_ACK";
28882    const EXTRA_CRC: u8 = 153u8;
28883    const ENCODED_LEN: usize = 8usize;
28884    fn deser(
28885        _version: MavlinkVersion,
28886        __input: &[u8],
28887    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28888        let avail_len = __input.len();
28889        let mut payload_buf = [0; Self::ENCODED_LEN];
28890        let mut buf = if avail_len < Self::ENCODED_LEN {
28891            payload_buf[0..avail_len].copy_from_slice(__input);
28892            Bytes::new(&payload_buf)
28893        } else {
28894            Bytes::new(__input)
28895        };
28896        let mut __struct = Self::default();
28897        __struct.target_system = buf.get_u8();
28898        __struct.target_component = buf.get_u8();
28899        let tmp = buf.get_u8();
28900        __struct.mavtype =
28901            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28902                enum_type: "MavMissionResult",
28903                value: tmp as u32,
28904            })?;
28905        let tmp = buf.get_u8();
28906        __struct.mission_type =
28907            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28908                enum_type: "MavMissionType",
28909                value: tmp as u32,
28910            })?;
28911        __struct.opaque_id = buf.get_u32_le();
28912        Ok(__struct)
28913    }
28914    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28915        let mut __tmp = BytesMut::new(bytes);
28916        #[allow(clippy::absurd_extreme_comparisons)]
28917        #[allow(unused_comparisons)]
28918        if __tmp.remaining() < Self::ENCODED_LEN {
28919            panic!(
28920                "buffer is too small (need {} bytes, but got {})",
28921                Self::ENCODED_LEN,
28922                __tmp.remaining(),
28923            )
28924        }
28925        __tmp.put_u8(self.target_system);
28926        __tmp.put_u8(self.target_component);
28927        __tmp.put_u8(self.mavtype as u8);
28928        __tmp.put_u8(self.mission_type as u8);
28929        __tmp.put_u32_le(self.opaque_id);
28930        if matches!(version, MavlinkVersion::V2) {
28931            let len = __tmp.len();
28932            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28933        } else {
28934            __tmp.len()
28935        }
28936    }
28937}
28938#[doc = "id: 264"]
28939#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
28940#[derive(Debug, Clone, PartialEq)]
28941#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28942#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28943pub struct FLIGHT_INFORMATION_DATA {
28944    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
28945    pub arming_time_utc: u64,
28946    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
28947    pub takeoff_time_utc: u64,
28948    #[doc = "Flight number. Note, field is misnamed UUID."]
28949    pub flight_uuid: u64,
28950    #[doc = "Timestamp (time since system boot)."]
28951    pub time_boot_ms: u32,
28952    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
28953    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28954    pub landing_time: u32,
28955}
28956impl FLIGHT_INFORMATION_DATA {
28957    pub const ENCODED_LEN: usize = 32usize;
28958    pub const DEFAULT: Self = Self {
28959        arming_time_utc: 0_u64,
28960        takeoff_time_utc: 0_u64,
28961        flight_uuid: 0_u64,
28962        time_boot_ms: 0_u32,
28963        landing_time: 0_u32,
28964    };
28965    #[cfg(feature = "arbitrary")]
28966    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28967        use arbitrary::{Arbitrary, Unstructured};
28968        let mut buf = [0u8; 1024];
28969        rng.fill_bytes(&mut buf);
28970        let mut unstructured = Unstructured::new(&buf);
28971        Self::arbitrary(&mut unstructured).unwrap_or_default()
28972    }
28973}
28974impl Default for FLIGHT_INFORMATION_DATA {
28975    fn default() -> Self {
28976        Self::DEFAULT.clone()
28977    }
28978}
28979impl MessageData for FLIGHT_INFORMATION_DATA {
28980    type Message = MavMessage;
28981    const ID: u32 = 264u32;
28982    const NAME: &'static str = "FLIGHT_INFORMATION";
28983    const EXTRA_CRC: u8 = 49u8;
28984    const ENCODED_LEN: usize = 32usize;
28985    fn deser(
28986        _version: MavlinkVersion,
28987        __input: &[u8],
28988    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28989        let avail_len = __input.len();
28990        let mut payload_buf = [0; Self::ENCODED_LEN];
28991        let mut buf = if avail_len < Self::ENCODED_LEN {
28992            payload_buf[0..avail_len].copy_from_slice(__input);
28993            Bytes::new(&payload_buf)
28994        } else {
28995            Bytes::new(__input)
28996        };
28997        let mut __struct = Self::default();
28998        __struct.arming_time_utc = buf.get_u64_le();
28999        __struct.takeoff_time_utc = buf.get_u64_le();
29000        __struct.flight_uuid = buf.get_u64_le();
29001        __struct.time_boot_ms = buf.get_u32_le();
29002        __struct.landing_time = buf.get_u32_le();
29003        Ok(__struct)
29004    }
29005    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29006        let mut __tmp = BytesMut::new(bytes);
29007        #[allow(clippy::absurd_extreme_comparisons)]
29008        #[allow(unused_comparisons)]
29009        if __tmp.remaining() < Self::ENCODED_LEN {
29010            panic!(
29011                "buffer is too small (need {} bytes, but got {})",
29012                Self::ENCODED_LEN,
29013                __tmp.remaining(),
29014            )
29015        }
29016        __tmp.put_u64_le(self.arming_time_utc);
29017        __tmp.put_u64_le(self.takeoff_time_utc);
29018        __tmp.put_u64_le(self.flight_uuid);
29019        __tmp.put_u32_le(self.time_boot_ms);
29020        __tmp.put_u32_le(self.landing_time);
29021        if matches!(version, MavlinkVersion::V2) {
29022            let len = __tmp.len();
29023            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29024        } else {
29025            __tmp.len()
29026        }
29027    }
29028}
29029#[doc = "id: 37"]
29030#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
29031#[derive(Debug, Clone, PartialEq)]
29032#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29033#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29034pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
29035    #[doc = "Start index"]
29036    pub start_index: i16,
29037    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
29038    pub end_index: i16,
29039    #[doc = "System ID"]
29040    pub target_system: u8,
29041    #[doc = "Component ID"]
29042    pub target_component: u8,
29043    #[doc = "Mission type."]
29044    #[cfg_attr(feature = "serde", serde(default))]
29045    pub mission_type: MavMissionType,
29046}
29047impl MISSION_REQUEST_PARTIAL_LIST_DATA {
29048    pub const ENCODED_LEN: usize = 7usize;
29049    pub const DEFAULT: Self = Self {
29050        start_index: 0_i16,
29051        end_index: 0_i16,
29052        target_system: 0_u8,
29053        target_component: 0_u8,
29054        mission_type: MavMissionType::DEFAULT,
29055    };
29056    #[cfg(feature = "arbitrary")]
29057    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29058        use arbitrary::{Arbitrary, Unstructured};
29059        let mut buf = [0u8; 1024];
29060        rng.fill_bytes(&mut buf);
29061        let mut unstructured = Unstructured::new(&buf);
29062        Self::arbitrary(&mut unstructured).unwrap_or_default()
29063    }
29064}
29065impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
29066    fn default() -> Self {
29067        Self::DEFAULT.clone()
29068    }
29069}
29070impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
29071    type Message = MavMessage;
29072    const ID: u32 = 37u32;
29073    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
29074    const EXTRA_CRC: u8 = 212u8;
29075    const ENCODED_LEN: usize = 7usize;
29076    fn deser(
29077        _version: MavlinkVersion,
29078        __input: &[u8],
29079    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29080        let avail_len = __input.len();
29081        let mut payload_buf = [0; Self::ENCODED_LEN];
29082        let mut buf = if avail_len < Self::ENCODED_LEN {
29083            payload_buf[0..avail_len].copy_from_slice(__input);
29084            Bytes::new(&payload_buf)
29085        } else {
29086            Bytes::new(__input)
29087        };
29088        let mut __struct = Self::default();
29089        __struct.start_index = buf.get_i16_le();
29090        __struct.end_index = buf.get_i16_le();
29091        __struct.target_system = buf.get_u8();
29092        __struct.target_component = buf.get_u8();
29093        let tmp = buf.get_u8();
29094        __struct.mission_type =
29095            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29096                enum_type: "MavMissionType",
29097                value: tmp as u32,
29098            })?;
29099        Ok(__struct)
29100    }
29101    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29102        let mut __tmp = BytesMut::new(bytes);
29103        #[allow(clippy::absurd_extreme_comparisons)]
29104        #[allow(unused_comparisons)]
29105        if __tmp.remaining() < Self::ENCODED_LEN {
29106            panic!(
29107                "buffer is too small (need {} bytes, but got {})",
29108                Self::ENCODED_LEN,
29109                __tmp.remaining(),
29110            )
29111        }
29112        __tmp.put_i16_le(self.start_index);
29113        __tmp.put_i16_le(self.end_index);
29114        __tmp.put_u8(self.target_system);
29115        __tmp.put_u8(self.target_component);
29116        __tmp.put_u8(self.mission_type as u8);
29117        if matches!(version, MavlinkVersion::V2) {
29118            let len = __tmp.len();
29119            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29120        } else {
29121            __tmp.len()
29122        }
29123    }
29124}
29125#[doc = "id: 60053"]
29126#[doc = "Drone operation mode."]
29127#[derive(Debug, Clone, PartialEq)]
29128#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29129#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29130pub struct AVSS_DRONE_OPERATION_MODE_DATA {
29131    #[doc = "Timestamp (time since FC boot)."]
29132    pub time_boot_ms: u32,
29133    #[doc = "DJI M300 operation mode"]
29134    pub M300_operation_mode: u8,
29135    #[doc = "horsefly operation mode"]
29136    pub horsefly_operation_mode: u8,
29137}
29138impl AVSS_DRONE_OPERATION_MODE_DATA {
29139    pub const ENCODED_LEN: usize = 6usize;
29140    pub const DEFAULT: Self = Self {
29141        time_boot_ms: 0_u32,
29142        M300_operation_mode: 0_u8,
29143        horsefly_operation_mode: 0_u8,
29144    };
29145    #[cfg(feature = "arbitrary")]
29146    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29147        use arbitrary::{Arbitrary, Unstructured};
29148        let mut buf = [0u8; 1024];
29149        rng.fill_bytes(&mut buf);
29150        let mut unstructured = Unstructured::new(&buf);
29151        Self::arbitrary(&mut unstructured).unwrap_or_default()
29152    }
29153}
29154impl Default for AVSS_DRONE_OPERATION_MODE_DATA {
29155    fn default() -> Self {
29156        Self::DEFAULT.clone()
29157    }
29158}
29159impl MessageData for AVSS_DRONE_OPERATION_MODE_DATA {
29160    type Message = MavMessage;
29161    const ID: u32 = 60053u32;
29162    const NAME: &'static str = "AVSS_DRONE_OPERATION_MODE";
29163    const EXTRA_CRC: u8 = 45u8;
29164    const ENCODED_LEN: usize = 6usize;
29165    fn deser(
29166        _version: MavlinkVersion,
29167        __input: &[u8],
29168    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29169        let avail_len = __input.len();
29170        let mut payload_buf = [0; Self::ENCODED_LEN];
29171        let mut buf = if avail_len < Self::ENCODED_LEN {
29172            payload_buf[0..avail_len].copy_from_slice(__input);
29173            Bytes::new(&payload_buf)
29174        } else {
29175            Bytes::new(__input)
29176        };
29177        let mut __struct = Self::default();
29178        __struct.time_boot_ms = buf.get_u32_le();
29179        __struct.M300_operation_mode = buf.get_u8();
29180        __struct.horsefly_operation_mode = buf.get_u8();
29181        Ok(__struct)
29182    }
29183    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29184        let mut __tmp = BytesMut::new(bytes);
29185        #[allow(clippy::absurd_extreme_comparisons)]
29186        #[allow(unused_comparisons)]
29187        if __tmp.remaining() < Self::ENCODED_LEN {
29188            panic!(
29189                "buffer is too small (need {} bytes, but got {})",
29190                Self::ENCODED_LEN,
29191                __tmp.remaining(),
29192            )
29193        }
29194        __tmp.put_u32_le(self.time_boot_ms);
29195        __tmp.put_u8(self.M300_operation_mode);
29196        __tmp.put_u8(self.horsefly_operation_mode);
29197        if matches!(version, MavlinkVersion::V2) {
29198            let len = __tmp.len();
29199            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29200        } else {
29201            __tmp.len()
29202        }
29203    }
29204}
29205#[doc = "id: 26"]
29206#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
29207#[derive(Debug, Clone, PartialEq)]
29208#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29209#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29210pub struct SCALED_IMU_DATA {
29211    #[doc = "Timestamp (time since system boot)."]
29212    pub time_boot_ms: u32,
29213    #[doc = "X acceleration"]
29214    pub xacc: i16,
29215    #[doc = "Y acceleration"]
29216    pub yacc: i16,
29217    #[doc = "Z acceleration"]
29218    pub zacc: i16,
29219    #[doc = "Angular speed around X axis"]
29220    pub xgyro: i16,
29221    #[doc = "Angular speed around Y axis"]
29222    pub ygyro: i16,
29223    #[doc = "Angular speed around Z axis"]
29224    pub zgyro: i16,
29225    #[doc = "X Magnetic field"]
29226    pub xmag: i16,
29227    #[doc = "Y Magnetic field"]
29228    pub ymag: i16,
29229    #[doc = "Z Magnetic field"]
29230    pub zmag: i16,
29231    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
29232    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29233    pub temperature: i16,
29234}
29235impl SCALED_IMU_DATA {
29236    pub const ENCODED_LEN: usize = 24usize;
29237    pub const DEFAULT: Self = Self {
29238        time_boot_ms: 0_u32,
29239        xacc: 0_i16,
29240        yacc: 0_i16,
29241        zacc: 0_i16,
29242        xgyro: 0_i16,
29243        ygyro: 0_i16,
29244        zgyro: 0_i16,
29245        xmag: 0_i16,
29246        ymag: 0_i16,
29247        zmag: 0_i16,
29248        temperature: 0_i16,
29249    };
29250    #[cfg(feature = "arbitrary")]
29251    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29252        use arbitrary::{Arbitrary, Unstructured};
29253        let mut buf = [0u8; 1024];
29254        rng.fill_bytes(&mut buf);
29255        let mut unstructured = Unstructured::new(&buf);
29256        Self::arbitrary(&mut unstructured).unwrap_or_default()
29257    }
29258}
29259impl Default for SCALED_IMU_DATA {
29260    fn default() -> Self {
29261        Self::DEFAULT.clone()
29262    }
29263}
29264impl MessageData for SCALED_IMU_DATA {
29265    type Message = MavMessage;
29266    const ID: u32 = 26u32;
29267    const NAME: &'static str = "SCALED_IMU";
29268    const EXTRA_CRC: u8 = 170u8;
29269    const ENCODED_LEN: usize = 24usize;
29270    fn deser(
29271        _version: MavlinkVersion,
29272        __input: &[u8],
29273    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29274        let avail_len = __input.len();
29275        let mut payload_buf = [0; Self::ENCODED_LEN];
29276        let mut buf = if avail_len < Self::ENCODED_LEN {
29277            payload_buf[0..avail_len].copy_from_slice(__input);
29278            Bytes::new(&payload_buf)
29279        } else {
29280            Bytes::new(__input)
29281        };
29282        let mut __struct = Self::default();
29283        __struct.time_boot_ms = buf.get_u32_le();
29284        __struct.xacc = buf.get_i16_le();
29285        __struct.yacc = buf.get_i16_le();
29286        __struct.zacc = buf.get_i16_le();
29287        __struct.xgyro = buf.get_i16_le();
29288        __struct.ygyro = buf.get_i16_le();
29289        __struct.zgyro = buf.get_i16_le();
29290        __struct.xmag = buf.get_i16_le();
29291        __struct.ymag = buf.get_i16_le();
29292        __struct.zmag = buf.get_i16_le();
29293        __struct.temperature = buf.get_i16_le();
29294        Ok(__struct)
29295    }
29296    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29297        let mut __tmp = BytesMut::new(bytes);
29298        #[allow(clippy::absurd_extreme_comparisons)]
29299        #[allow(unused_comparisons)]
29300        if __tmp.remaining() < Self::ENCODED_LEN {
29301            panic!(
29302                "buffer is too small (need {} bytes, but got {})",
29303                Self::ENCODED_LEN,
29304                __tmp.remaining(),
29305            )
29306        }
29307        __tmp.put_u32_le(self.time_boot_ms);
29308        __tmp.put_i16_le(self.xacc);
29309        __tmp.put_i16_le(self.yacc);
29310        __tmp.put_i16_le(self.zacc);
29311        __tmp.put_i16_le(self.xgyro);
29312        __tmp.put_i16_le(self.ygyro);
29313        __tmp.put_i16_le(self.zgyro);
29314        __tmp.put_i16_le(self.xmag);
29315        __tmp.put_i16_le(self.ymag);
29316        __tmp.put_i16_le(self.zmag);
29317        __tmp.put_i16_le(self.temperature);
29318        if matches!(version, MavlinkVersion::V2) {
29319            let len = __tmp.len();
29320            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29321        } else {
29322            __tmp.len()
29323        }
29324    }
29325}
29326#[doc = "id: 285"]
29327#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
29328#[derive(Debug, Clone, PartialEq)]
29329#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29330#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29331pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
29332    #[doc = "Timestamp (time since system boot)."]
29333    pub time_boot_ms: u32,
29334    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
29335    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29336    pub q: [f32; 4],
29337    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
29338    pub angular_velocity_x: f32,
29339    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
29340    pub angular_velocity_y: f32,
29341    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
29342    pub angular_velocity_z: f32,
29343    #[doc = "Failure flags (0 for no failure)"]
29344    pub failure_flags: GimbalDeviceErrorFlags,
29345    #[doc = "Current gimbal flags set."]
29346    pub flags: GimbalDeviceFlags,
29347    #[doc = "System ID"]
29348    pub target_system: u8,
29349    #[doc = "Component ID"]
29350    pub target_component: u8,
29351    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
29352    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29353    pub delta_yaw: f32,
29354    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
29355    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29356    pub delta_yaw_velocity: f32,
29357    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
29358    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29359    pub gimbal_device_id: u8,
29360}
29361impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
29362    pub const ENCODED_LEN: usize = 49usize;
29363    pub const DEFAULT: Self = Self {
29364        time_boot_ms: 0_u32,
29365        q: [0.0_f32; 4usize],
29366        angular_velocity_x: 0.0_f32,
29367        angular_velocity_y: 0.0_f32,
29368        angular_velocity_z: 0.0_f32,
29369        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
29370        flags: GimbalDeviceFlags::DEFAULT,
29371        target_system: 0_u8,
29372        target_component: 0_u8,
29373        delta_yaw: 0.0_f32,
29374        delta_yaw_velocity: 0.0_f32,
29375        gimbal_device_id: 0_u8,
29376    };
29377    #[cfg(feature = "arbitrary")]
29378    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29379        use arbitrary::{Arbitrary, Unstructured};
29380        let mut buf = [0u8; 1024];
29381        rng.fill_bytes(&mut buf);
29382        let mut unstructured = Unstructured::new(&buf);
29383        Self::arbitrary(&mut unstructured).unwrap_or_default()
29384    }
29385}
29386impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
29387    fn default() -> Self {
29388        Self::DEFAULT.clone()
29389    }
29390}
29391impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
29392    type Message = MavMessage;
29393    const ID: u32 = 285u32;
29394    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
29395    const EXTRA_CRC: u8 = 137u8;
29396    const ENCODED_LEN: usize = 49usize;
29397    fn deser(
29398        _version: MavlinkVersion,
29399        __input: &[u8],
29400    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29401        let avail_len = __input.len();
29402        let mut payload_buf = [0; Self::ENCODED_LEN];
29403        let mut buf = if avail_len < Self::ENCODED_LEN {
29404            payload_buf[0..avail_len].copy_from_slice(__input);
29405            Bytes::new(&payload_buf)
29406        } else {
29407            Bytes::new(__input)
29408        };
29409        let mut __struct = Self::default();
29410        __struct.time_boot_ms = buf.get_u32_le();
29411        for v in &mut __struct.q {
29412            let val = buf.get_f32_le();
29413            *v = val;
29414        }
29415        __struct.angular_velocity_x = buf.get_f32_le();
29416        __struct.angular_velocity_y = buf.get_f32_le();
29417        __struct.angular_velocity_z = buf.get_f32_le();
29418        let tmp = buf.get_u32_le();
29419        __struct.failure_flags = GimbalDeviceErrorFlags::from_bits(
29420            tmp & GimbalDeviceErrorFlags::all().bits(),
29421        )
29422        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29423            flag_type: "GimbalDeviceErrorFlags",
29424            value: tmp as u32,
29425        })?;
29426        let tmp = buf.get_u16_le();
29427        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
29428            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29429                flag_type: "GimbalDeviceFlags",
29430                value: tmp as u32,
29431            })?;
29432        __struct.target_system = buf.get_u8();
29433        __struct.target_component = buf.get_u8();
29434        __struct.delta_yaw = buf.get_f32_le();
29435        __struct.delta_yaw_velocity = buf.get_f32_le();
29436        __struct.gimbal_device_id = buf.get_u8();
29437        Ok(__struct)
29438    }
29439    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29440        let mut __tmp = BytesMut::new(bytes);
29441        #[allow(clippy::absurd_extreme_comparisons)]
29442        #[allow(unused_comparisons)]
29443        if __tmp.remaining() < Self::ENCODED_LEN {
29444            panic!(
29445                "buffer is too small (need {} bytes, but got {})",
29446                Self::ENCODED_LEN,
29447                __tmp.remaining(),
29448            )
29449        }
29450        __tmp.put_u32_le(self.time_boot_ms);
29451        for val in &self.q {
29452            __tmp.put_f32_le(*val);
29453        }
29454        __tmp.put_f32_le(self.angular_velocity_x);
29455        __tmp.put_f32_le(self.angular_velocity_y);
29456        __tmp.put_f32_le(self.angular_velocity_z);
29457        __tmp.put_u32_le(self.failure_flags.bits());
29458        __tmp.put_u16_le(self.flags.bits());
29459        __tmp.put_u8(self.target_system);
29460        __tmp.put_u8(self.target_component);
29461        __tmp.put_f32_le(self.delta_yaw);
29462        __tmp.put_f32_le(self.delta_yaw_velocity);
29463        __tmp.put_u8(self.gimbal_device_id);
29464        if matches!(version, MavlinkVersion::V2) {
29465            let len = __tmp.len();
29466            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29467        } else {
29468            __tmp.len()
29469        }
29470    }
29471}
29472#[doc = "id: 67"]
29473#[doc = "Data stream status information."]
29474#[derive(Debug, Clone, PartialEq)]
29475#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29476#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29477pub struct DATA_STREAM_DATA {
29478    #[doc = "The message rate"]
29479    pub message_rate: u16,
29480    #[doc = "The ID of the requested data stream"]
29481    pub stream_id: u8,
29482    #[doc = "1 stream is enabled, 0 stream is stopped."]
29483    pub on_off: u8,
29484}
29485impl DATA_STREAM_DATA {
29486    pub const ENCODED_LEN: usize = 4usize;
29487    pub const DEFAULT: Self = Self {
29488        message_rate: 0_u16,
29489        stream_id: 0_u8,
29490        on_off: 0_u8,
29491    };
29492    #[cfg(feature = "arbitrary")]
29493    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29494        use arbitrary::{Arbitrary, Unstructured};
29495        let mut buf = [0u8; 1024];
29496        rng.fill_bytes(&mut buf);
29497        let mut unstructured = Unstructured::new(&buf);
29498        Self::arbitrary(&mut unstructured).unwrap_or_default()
29499    }
29500}
29501impl Default for DATA_STREAM_DATA {
29502    fn default() -> Self {
29503        Self::DEFAULT.clone()
29504    }
29505}
29506impl MessageData for DATA_STREAM_DATA {
29507    type Message = MavMessage;
29508    const ID: u32 = 67u32;
29509    const NAME: &'static str = "DATA_STREAM";
29510    const EXTRA_CRC: u8 = 21u8;
29511    const ENCODED_LEN: usize = 4usize;
29512    fn deser(
29513        _version: MavlinkVersion,
29514        __input: &[u8],
29515    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29516        let avail_len = __input.len();
29517        let mut payload_buf = [0; Self::ENCODED_LEN];
29518        let mut buf = if avail_len < Self::ENCODED_LEN {
29519            payload_buf[0..avail_len].copy_from_slice(__input);
29520            Bytes::new(&payload_buf)
29521        } else {
29522            Bytes::new(__input)
29523        };
29524        let mut __struct = Self::default();
29525        __struct.message_rate = buf.get_u16_le();
29526        __struct.stream_id = buf.get_u8();
29527        __struct.on_off = buf.get_u8();
29528        Ok(__struct)
29529    }
29530    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29531        let mut __tmp = BytesMut::new(bytes);
29532        #[allow(clippy::absurd_extreme_comparisons)]
29533        #[allow(unused_comparisons)]
29534        if __tmp.remaining() < Self::ENCODED_LEN {
29535            panic!(
29536                "buffer is too small (need {} bytes, but got {})",
29537                Self::ENCODED_LEN,
29538                __tmp.remaining(),
29539            )
29540        }
29541        __tmp.put_u16_le(self.message_rate);
29542        __tmp.put_u8(self.stream_id);
29543        __tmp.put_u8(self.on_off);
29544        if matches!(version, MavlinkVersion::V2) {
29545            let len = __tmp.len();
29546            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29547        } else {
29548            __tmp.len()
29549        }
29550    }
29551}
29552#[doc = "id: 245"]
29553#[doc = "Provides state for additional features."]
29554#[derive(Debug, Clone, PartialEq)]
29555#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29556#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29557pub struct EXTENDED_SYS_STATE_DATA {
29558    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
29559    pub vtol_state: MavVtolState,
29560    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
29561    pub landed_state: MavLandedState,
29562}
29563impl EXTENDED_SYS_STATE_DATA {
29564    pub const ENCODED_LEN: usize = 2usize;
29565    pub const DEFAULT: Self = Self {
29566        vtol_state: MavVtolState::DEFAULT,
29567        landed_state: MavLandedState::DEFAULT,
29568    };
29569    #[cfg(feature = "arbitrary")]
29570    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29571        use arbitrary::{Arbitrary, Unstructured};
29572        let mut buf = [0u8; 1024];
29573        rng.fill_bytes(&mut buf);
29574        let mut unstructured = Unstructured::new(&buf);
29575        Self::arbitrary(&mut unstructured).unwrap_or_default()
29576    }
29577}
29578impl Default for EXTENDED_SYS_STATE_DATA {
29579    fn default() -> Self {
29580        Self::DEFAULT.clone()
29581    }
29582}
29583impl MessageData for EXTENDED_SYS_STATE_DATA {
29584    type Message = MavMessage;
29585    const ID: u32 = 245u32;
29586    const NAME: &'static str = "EXTENDED_SYS_STATE";
29587    const EXTRA_CRC: u8 = 130u8;
29588    const ENCODED_LEN: usize = 2usize;
29589    fn deser(
29590        _version: MavlinkVersion,
29591        __input: &[u8],
29592    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29593        let avail_len = __input.len();
29594        let mut payload_buf = [0; Self::ENCODED_LEN];
29595        let mut buf = if avail_len < Self::ENCODED_LEN {
29596            payload_buf[0..avail_len].copy_from_slice(__input);
29597            Bytes::new(&payload_buf)
29598        } else {
29599            Bytes::new(__input)
29600        };
29601        let mut __struct = Self::default();
29602        let tmp = buf.get_u8();
29603        __struct.vtol_state =
29604            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29605                enum_type: "MavVtolState",
29606                value: tmp as u32,
29607            })?;
29608        let tmp = buf.get_u8();
29609        __struct.landed_state =
29610            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29611                enum_type: "MavLandedState",
29612                value: tmp as u32,
29613            })?;
29614        Ok(__struct)
29615    }
29616    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29617        let mut __tmp = BytesMut::new(bytes);
29618        #[allow(clippy::absurd_extreme_comparisons)]
29619        #[allow(unused_comparisons)]
29620        if __tmp.remaining() < Self::ENCODED_LEN {
29621            panic!(
29622                "buffer is too small (need {} bytes, but got {})",
29623                Self::ENCODED_LEN,
29624                __tmp.remaining(),
29625            )
29626        }
29627        __tmp.put_u8(self.vtol_state as u8);
29628        __tmp.put_u8(self.landed_state as u8);
29629        if matches!(version, MavlinkVersion::V2) {
29630            let len = __tmp.len();
29631            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29632        } else {
29633            __tmp.len()
29634        }
29635    }
29636}
29637#[doc = "id: 20"]
29638#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
29639#[derive(Debug, Clone, PartialEq)]
29640#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29641#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29642pub struct PARAM_REQUEST_READ_DATA {
29643    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
29644    pub param_index: i16,
29645    #[doc = "System ID"]
29646    pub target_system: u8,
29647    #[doc = "Component ID"]
29648    pub target_component: u8,
29649    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
29650    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29651    pub param_id: [u8; 16],
29652}
29653impl PARAM_REQUEST_READ_DATA {
29654    pub const ENCODED_LEN: usize = 20usize;
29655    pub const DEFAULT: Self = Self {
29656        param_index: 0_i16,
29657        target_system: 0_u8,
29658        target_component: 0_u8,
29659        param_id: [0_u8; 16usize],
29660    };
29661    #[cfg(feature = "arbitrary")]
29662    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29663        use arbitrary::{Arbitrary, Unstructured};
29664        let mut buf = [0u8; 1024];
29665        rng.fill_bytes(&mut buf);
29666        let mut unstructured = Unstructured::new(&buf);
29667        Self::arbitrary(&mut unstructured).unwrap_or_default()
29668    }
29669}
29670impl Default for PARAM_REQUEST_READ_DATA {
29671    fn default() -> Self {
29672        Self::DEFAULT.clone()
29673    }
29674}
29675impl MessageData for PARAM_REQUEST_READ_DATA {
29676    type Message = MavMessage;
29677    const ID: u32 = 20u32;
29678    const NAME: &'static str = "PARAM_REQUEST_READ";
29679    const EXTRA_CRC: u8 = 214u8;
29680    const ENCODED_LEN: usize = 20usize;
29681    fn deser(
29682        _version: MavlinkVersion,
29683        __input: &[u8],
29684    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29685        let avail_len = __input.len();
29686        let mut payload_buf = [0; Self::ENCODED_LEN];
29687        let mut buf = if avail_len < Self::ENCODED_LEN {
29688            payload_buf[0..avail_len].copy_from_slice(__input);
29689            Bytes::new(&payload_buf)
29690        } else {
29691            Bytes::new(__input)
29692        };
29693        let mut __struct = Self::default();
29694        __struct.param_index = buf.get_i16_le();
29695        __struct.target_system = buf.get_u8();
29696        __struct.target_component = buf.get_u8();
29697        for v in &mut __struct.param_id {
29698            let val = buf.get_u8();
29699            *v = val;
29700        }
29701        Ok(__struct)
29702    }
29703    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29704        let mut __tmp = BytesMut::new(bytes);
29705        #[allow(clippy::absurd_extreme_comparisons)]
29706        #[allow(unused_comparisons)]
29707        if __tmp.remaining() < Self::ENCODED_LEN {
29708            panic!(
29709                "buffer is too small (need {} bytes, but got {})",
29710                Self::ENCODED_LEN,
29711                __tmp.remaining(),
29712            )
29713        }
29714        __tmp.put_i16_le(self.param_index);
29715        __tmp.put_u8(self.target_system);
29716        __tmp.put_u8(self.target_component);
29717        for val in &self.param_id {
29718            __tmp.put_u8(*val);
29719        }
29720        if matches!(version, MavlinkVersion::V2) {
29721            let len = __tmp.len();
29722            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29723        } else {
29724            __tmp.len()
29725        }
29726    }
29727}
29728#[doc = "id: 242"]
29729#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
29730#[derive(Debug, Clone, PartialEq)]
29731#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29732#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29733pub struct HOME_POSITION_DATA {
29734    #[doc = "Latitude (WGS84)"]
29735    pub latitude: i32,
29736    #[doc = "Longitude (WGS84)"]
29737    pub longitude: i32,
29738    #[doc = "Altitude (MSL). Positive for up."]
29739    pub altitude: i32,
29740    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
29741    pub x: f32,
29742    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
29743    pub y: f32,
29744    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
29745    pub z: f32,
29746    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
29747    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29748    pub q: [f32; 4],
29749    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
29750    pub approach_x: f32,
29751    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
29752    pub approach_y: f32,
29753    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
29754    pub approach_z: f32,
29755    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29756    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29757    pub time_usec: u64,
29758}
29759impl HOME_POSITION_DATA {
29760    pub const ENCODED_LEN: usize = 60usize;
29761    pub const DEFAULT: Self = Self {
29762        latitude: 0_i32,
29763        longitude: 0_i32,
29764        altitude: 0_i32,
29765        x: 0.0_f32,
29766        y: 0.0_f32,
29767        z: 0.0_f32,
29768        q: [0.0_f32; 4usize],
29769        approach_x: 0.0_f32,
29770        approach_y: 0.0_f32,
29771        approach_z: 0.0_f32,
29772        time_usec: 0_u64,
29773    };
29774    #[cfg(feature = "arbitrary")]
29775    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29776        use arbitrary::{Arbitrary, Unstructured};
29777        let mut buf = [0u8; 1024];
29778        rng.fill_bytes(&mut buf);
29779        let mut unstructured = Unstructured::new(&buf);
29780        Self::arbitrary(&mut unstructured).unwrap_or_default()
29781    }
29782}
29783impl Default for HOME_POSITION_DATA {
29784    fn default() -> Self {
29785        Self::DEFAULT.clone()
29786    }
29787}
29788impl MessageData for HOME_POSITION_DATA {
29789    type Message = MavMessage;
29790    const ID: u32 = 242u32;
29791    const NAME: &'static str = "HOME_POSITION";
29792    const EXTRA_CRC: u8 = 104u8;
29793    const ENCODED_LEN: usize = 60usize;
29794    fn deser(
29795        _version: MavlinkVersion,
29796        __input: &[u8],
29797    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29798        let avail_len = __input.len();
29799        let mut payload_buf = [0; Self::ENCODED_LEN];
29800        let mut buf = if avail_len < Self::ENCODED_LEN {
29801            payload_buf[0..avail_len].copy_from_slice(__input);
29802            Bytes::new(&payload_buf)
29803        } else {
29804            Bytes::new(__input)
29805        };
29806        let mut __struct = Self::default();
29807        __struct.latitude = buf.get_i32_le();
29808        __struct.longitude = buf.get_i32_le();
29809        __struct.altitude = buf.get_i32_le();
29810        __struct.x = buf.get_f32_le();
29811        __struct.y = buf.get_f32_le();
29812        __struct.z = buf.get_f32_le();
29813        for v in &mut __struct.q {
29814            let val = buf.get_f32_le();
29815            *v = val;
29816        }
29817        __struct.approach_x = buf.get_f32_le();
29818        __struct.approach_y = buf.get_f32_le();
29819        __struct.approach_z = buf.get_f32_le();
29820        __struct.time_usec = buf.get_u64_le();
29821        Ok(__struct)
29822    }
29823    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29824        let mut __tmp = BytesMut::new(bytes);
29825        #[allow(clippy::absurd_extreme_comparisons)]
29826        #[allow(unused_comparisons)]
29827        if __tmp.remaining() < Self::ENCODED_LEN {
29828            panic!(
29829                "buffer is too small (need {} bytes, but got {})",
29830                Self::ENCODED_LEN,
29831                __tmp.remaining(),
29832            )
29833        }
29834        __tmp.put_i32_le(self.latitude);
29835        __tmp.put_i32_le(self.longitude);
29836        __tmp.put_i32_le(self.altitude);
29837        __tmp.put_f32_le(self.x);
29838        __tmp.put_f32_le(self.y);
29839        __tmp.put_f32_le(self.z);
29840        for val in &self.q {
29841            __tmp.put_f32_le(*val);
29842        }
29843        __tmp.put_f32_le(self.approach_x);
29844        __tmp.put_f32_le(self.approach_y);
29845        __tmp.put_f32_le(self.approach_z);
29846        __tmp.put_u64_le(self.time_usec);
29847        if matches!(version, MavlinkVersion::V2) {
29848            let len = __tmp.len();
29849            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29850        } else {
29851            __tmp.len()
29852        }
29853    }
29854}
29855#[doc = "id: 252"]
29856#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
29857#[derive(Debug, Clone, PartialEq)]
29858#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29859#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29860pub struct NAMED_VALUE_INT_DATA {
29861    #[doc = "Timestamp (time since system boot)."]
29862    pub time_boot_ms: u32,
29863    #[doc = "Signed integer value"]
29864    pub value: i32,
29865    #[doc = "Name of the debug variable"]
29866    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29867    pub name: [u8; 10],
29868}
29869impl NAMED_VALUE_INT_DATA {
29870    pub const ENCODED_LEN: usize = 18usize;
29871    pub const DEFAULT: Self = Self {
29872        time_boot_ms: 0_u32,
29873        value: 0_i32,
29874        name: [0_u8; 10usize],
29875    };
29876    #[cfg(feature = "arbitrary")]
29877    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29878        use arbitrary::{Arbitrary, Unstructured};
29879        let mut buf = [0u8; 1024];
29880        rng.fill_bytes(&mut buf);
29881        let mut unstructured = Unstructured::new(&buf);
29882        Self::arbitrary(&mut unstructured).unwrap_or_default()
29883    }
29884}
29885impl Default for NAMED_VALUE_INT_DATA {
29886    fn default() -> Self {
29887        Self::DEFAULT.clone()
29888    }
29889}
29890impl MessageData for NAMED_VALUE_INT_DATA {
29891    type Message = MavMessage;
29892    const ID: u32 = 252u32;
29893    const NAME: &'static str = "NAMED_VALUE_INT";
29894    const EXTRA_CRC: u8 = 44u8;
29895    const ENCODED_LEN: usize = 18usize;
29896    fn deser(
29897        _version: MavlinkVersion,
29898        __input: &[u8],
29899    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29900        let avail_len = __input.len();
29901        let mut payload_buf = [0; Self::ENCODED_LEN];
29902        let mut buf = if avail_len < Self::ENCODED_LEN {
29903            payload_buf[0..avail_len].copy_from_slice(__input);
29904            Bytes::new(&payload_buf)
29905        } else {
29906            Bytes::new(__input)
29907        };
29908        let mut __struct = Self::default();
29909        __struct.time_boot_ms = buf.get_u32_le();
29910        __struct.value = buf.get_i32_le();
29911        for v in &mut __struct.name {
29912            let val = buf.get_u8();
29913            *v = val;
29914        }
29915        Ok(__struct)
29916    }
29917    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29918        let mut __tmp = BytesMut::new(bytes);
29919        #[allow(clippy::absurd_extreme_comparisons)]
29920        #[allow(unused_comparisons)]
29921        if __tmp.remaining() < Self::ENCODED_LEN {
29922            panic!(
29923                "buffer is too small (need {} bytes, but got {})",
29924                Self::ENCODED_LEN,
29925                __tmp.remaining(),
29926            )
29927        }
29928        __tmp.put_u32_le(self.time_boot_ms);
29929        __tmp.put_i32_le(self.value);
29930        for val in &self.name {
29931            __tmp.put_u8(*val);
29932        }
29933        if matches!(version, MavlinkVersion::V2) {
29934            let len = __tmp.len();
29935            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29936        } else {
29937            __tmp.len()
29938        }
29939    }
29940}
29941#[doc = "id: 277"]
29942#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
29943#[derive(Debug, Clone, PartialEq)]
29944#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29945#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29946pub struct CAMERA_THERMAL_RANGE_DATA {
29947    #[doc = "Timestamp (time since system boot)."]
29948    pub time_boot_ms: u32,
29949    #[doc = "Temperature max."]
29950    pub max: f32,
29951    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
29952    pub max_point_x: f32,
29953    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
29954    pub max_point_y: f32,
29955    #[doc = "Temperature min."]
29956    pub min: f32,
29957    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
29958    pub min_point_x: f32,
29959    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
29960    pub min_point_y: f32,
29961    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
29962    pub stream_id: u8,
29963    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
29964    pub camera_device_id: u8,
29965}
29966impl CAMERA_THERMAL_RANGE_DATA {
29967    pub const ENCODED_LEN: usize = 30usize;
29968    pub const DEFAULT: Self = Self {
29969        time_boot_ms: 0_u32,
29970        max: 0.0_f32,
29971        max_point_x: 0.0_f32,
29972        max_point_y: 0.0_f32,
29973        min: 0.0_f32,
29974        min_point_x: 0.0_f32,
29975        min_point_y: 0.0_f32,
29976        stream_id: 0_u8,
29977        camera_device_id: 0_u8,
29978    };
29979    #[cfg(feature = "arbitrary")]
29980    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29981        use arbitrary::{Arbitrary, Unstructured};
29982        let mut buf = [0u8; 1024];
29983        rng.fill_bytes(&mut buf);
29984        let mut unstructured = Unstructured::new(&buf);
29985        Self::arbitrary(&mut unstructured).unwrap_or_default()
29986    }
29987}
29988impl Default for CAMERA_THERMAL_RANGE_DATA {
29989    fn default() -> Self {
29990        Self::DEFAULT.clone()
29991    }
29992}
29993impl MessageData for CAMERA_THERMAL_RANGE_DATA {
29994    type Message = MavMessage;
29995    const ID: u32 = 277u32;
29996    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
29997    const EXTRA_CRC: u8 = 62u8;
29998    const ENCODED_LEN: usize = 30usize;
29999    fn deser(
30000        _version: MavlinkVersion,
30001        __input: &[u8],
30002    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30003        let avail_len = __input.len();
30004        let mut payload_buf = [0; Self::ENCODED_LEN];
30005        let mut buf = if avail_len < Self::ENCODED_LEN {
30006            payload_buf[0..avail_len].copy_from_slice(__input);
30007            Bytes::new(&payload_buf)
30008        } else {
30009            Bytes::new(__input)
30010        };
30011        let mut __struct = Self::default();
30012        __struct.time_boot_ms = buf.get_u32_le();
30013        __struct.max = buf.get_f32_le();
30014        __struct.max_point_x = buf.get_f32_le();
30015        __struct.max_point_y = buf.get_f32_le();
30016        __struct.min = buf.get_f32_le();
30017        __struct.min_point_x = buf.get_f32_le();
30018        __struct.min_point_y = buf.get_f32_le();
30019        __struct.stream_id = buf.get_u8();
30020        __struct.camera_device_id = buf.get_u8();
30021        Ok(__struct)
30022    }
30023    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30024        let mut __tmp = BytesMut::new(bytes);
30025        #[allow(clippy::absurd_extreme_comparisons)]
30026        #[allow(unused_comparisons)]
30027        if __tmp.remaining() < Self::ENCODED_LEN {
30028            panic!(
30029                "buffer is too small (need {} bytes, but got {})",
30030                Self::ENCODED_LEN,
30031                __tmp.remaining(),
30032            )
30033        }
30034        __tmp.put_u32_le(self.time_boot_ms);
30035        __tmp.put_f32_le(self.max);
30036        __tmp.put_f32_le(self.max_point_x);
30037        __tmp.put_f32_le(self.max_point_y);
30038        __tmp.put_f32_le(self.min);
30039        __tmp.put_f32_le(self.min_point_x);
30040        __tmp.put_f32_le(self.min_point_y);
30041        __tmp.put_u8(self.stream_id);
30042        __tmp.put_u8(self.camera_device_id);
30043        if matches!(version, MavlinkVersion::V2) {
30044            let len = __tmp.len();
30045            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30046        } else {
30047            __tmp.len()
30048        }
30049    }
30050}
30051#[doc = "id: 269"]
30052#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
30053#[derive(Debug, Clone, PartialEq)]
30054#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30055#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30056pub struct VIDEO_STREAM_INFORMATION_DATA {
30057    #[doc = "Frame rate."]
30058    pub framerate: f32,
30059    #[doc = "Bit rate."]
30060    pub bitrate: u32,
30061    #[doc = "Bitmap of stream status flags."]
30062    pub flags: VideoStreamStatusFlags,
30063    #[doc = "Horizontal resolution."]
30064    pub resolution_h: u16,
30065    #[doc = "Vertical resolution."]
30066    pub resolution_v: u16,
30067    #[doc = "Video image rotation clockwise."]
30068    pub rotation: u16,
30069    #[doc = "Horizontal Field of view."]
30070    pub hfov: u16,
30071    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
30072    pub stream_id: u8,
30073    #[doc = "Number of streams available."]
30074    pub count: u8,
30075    #[doc = "Type of stream."]
30076    pub mavtype: VideoStreamType,
30077    #[doc = "Stream name."]
30078    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30079    pub name: [u8; 32],
30080    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
30081    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30082    pub uri: [u8; 160],
30083    #[doc = "Encoding of stream."]
30084    #[cfg_attr(feature = "serde", serde(default))]
30085    pub encoding: VideoStreamEncoding,
30086    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
30087    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30088    pub camera_device_id: u8,
30089}
30090impl VIDEO_STREAM_INFORMATION_DATA {
30091    pub const ENCODED_LEN: usize = 215usize;
30092    pub const DEFAULT: Self = Self {
30093        framerate: 0.0_f32,
30094        bitrate: 0_u32,
30095        flags: VideoStreamStatusFlags::DEFAULT,
30096        resolution_h: 0_u16,
30097        resolution_v: 0_u16,
30098        rotation: 0_u16,
30099        hfov: 0_u16,
30100        stream_id: 0_u8,
30101        count: 0_u8,
30102        mavtype: VideoStreamType::DEFAULT,
30103        name: [0_u8; 32usize],
30104        uri: [0_u8; 160usize],
30105        encoding: VideoStreamEncoding::DEFAULT,
30106        camera_device_id: 0_u8,
30107    };
30108    #[cfg(feature = "arbitrary")]
30109    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30110        use arbitrary::{Arbitrary, Unstructured};
30111        let mut buf = [0u8; 1024];
30112        rng.fill_bytes(&mut buf);
30113        let mut unstructured = Unstructured::new(&buf);
30114        Self::arbitrary(&mut unstructured).unwrap_or_default()
30115    }
30116}
30117impl Default for VIDEO_STREAM_INFORMATION_DATA {
30118    fn default() -> Self {
30119        Self::DEFAULT.clone()
30120    }
30121}
30122impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
30123    type Message = MavMessage;
30124    const ID: u32 = 269u32;
30125    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
30126    const EXTRA_CRC: u8 = 109u8;
30127    const ENCODED_LEN: usize = 215usize;
30128    fn deser(
30129        _version: MavlinkVersion,
30130        __input: &[u8],
30131    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30132        let avail_len = __input.len();
30133        let mut payload_buf = [0; Self::ENCODED_LEN];
30134        let mut buf = if avail_len < Self::ENCODED_LEN {
30135            payload_buf[0..avail_len].copy_from_slice(__input);
30136            Bytes::new(&payload_buf)
30137        } else {
30138            Bytes::new(__input)
30139        };
30140        let mut __struct = Self::default();
30141        __struct.framerate = buf.get_f32_le();
30142        __struct.bitrate = buf.get_u32_le();
30143        let tmp = buf.get_u16_le();
30144        __struct.flags = VideoStreamStatusFlags::from_bits(
30145            tmp & VideoStreamStatusFlags::all().bits(),
30146        )
30147        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30148            flag_type: "VideoStreamStatusFlags",
30149            value: tmp as u32,
30150        })?;
30151        __struct.resolution_h = buf.get_u16_le();
30152        __struct.resolution_v = buf.get_u16_le();
30153        __struct.rotation = buf.get_u16_le();
30154        __struct.hfov = buf.get_u16_le();
30155        __struct.stream_id = buf.get_u8();
30156        __struct.count = buf.get_u8();
30157        let tmp = buf.get_u8();
30158        __struct.mavtype =
30159            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30160                enum_type: "VideoStreamType",
30161                value: tmp as u32,
30162            })?;
30163        for v in &mut __struct.name {
30164            let val = buf.get_u8();
30165            *v = val;
30166        }
30167        for v in &mut __struct.uri {
30168            let val = buf.get_u8();
30169            *v = val;
30170        }
30171        let tmp = buf.get_u8();
30172        __struct.encoding =
30173            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30174                enum_type: "VideoStreamEncoding",
30175                value: tmp as u32,
30176            })?;
30177        __struct.camera_device_id = buf.get_u8();
30178        Ok(__struct)
30179    }
30180    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30181        let mut __tmp = BytesMut::new(bytes);
30182        #[allow(clippy::absurd_extreme_comparisons)]
30183        #[allow(unused_comparisons)]
30184        if __tmp.remaining() < Self::ENCODED_LEN {
30185            panic!(
30186                "buffer is too small (need {} bytes, but got {})",
30187                Self::ENCODED_LEN,
30188                __tmp.remaining(),
30189            )
30190        }
30191        __tmp.put_f32_le(self.framerate);
30192        __tmp.put_u32_le(self.bitrate);
30193        __tmp.put_u16_le(self.flags.bits());
30194        __tmp.put_u16_le(self.resolution_h);
30195        __tmp.put_u16_le(self.resolution_v);
30196        __tmp.put_u16_le(self.rotation);
30197        __tmp.put_u16_le(self.hfov);
30198        __tmp.put_u8(self.stream_id);
30199        __tmp.put_u8(self.count);
30200        __tmp.put_u8(self.mavtype as u8);
30201        for val in &self.name {
30202            __tmp.put_u8(*val);
30203        }
30204        for val in &self.uri {
30205            __tmp.put_u8(*val);
30206        }
30207        __tmp.put_u8(self.encoding as u8);
30208        __tmp.put_u8(self.camera_device_id);
30209        if matches!(version, MavlinkVersion::V2) {
30210            let len = __tmp.len();
30211            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30212        } else {
30213            __tmp.len()
30214        }
30215    }
30216}
30217#[doc = "id: 283"]
30218#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
30219#[derive(Debug, Clone, PartialEq)]
30220#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30221#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30222pub struct GIMBAL_DEVICE_INFORMATION_DATA {
30223    #[doc = "UID of gimbal hardware (0 if unknown)."]
30224    pub uid: u64,
30225    #[doc = "Timestamp (time since system boot)."]
30226    pub time_boot_ms: u32,
30227    #[doc = "0xff)."]
30228    pub firmware_version: u32,
30229    #[doc = "0xff)."]
30230    pub hardware_version: u32,
30231    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
30232    pub roll_min: f32,
30233    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
30234    pub roll_max: f32,
30235    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
30236    pub pitch_min: f32,
30237    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
30238    pub pitch_max: f32,
30239    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
30240    pub yaw_min: f32,
30241    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
30242    pub yaw_max: f32,
30243    #[doc = "Bitmap of gimbal capability flags."]
30244    pub cap_flags: GimbalDeviceCapFlags,
30245    #[doc = "Bitmap for use for gimbal-specific capability flags."]
30246    pub custom_cap_flags: u16,
30247    #[doc = "Name of the gimbal vendor."]
30248    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30249    pub vendor_name: [u8; 32],
30250    #[doc = "Name of the gimbal model."]
30251    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30252    pub model_name: [u8; 32],
30253    #[doc = "Custom name of the gimbal given to it by the user."]
30254    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30255    pub custom_name: [u8; 32],
30256    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
30257    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30258    pub gimbal_device_id: u8,
30259}
30260impl GIMBAL_DEVICE_INFORMATION_DATA {
30261    pub const ENCODED_LEN: usize = 145usize;
30262    pub const DEFAULT: Self = Self {
30263        uid: 0_u64,
30264        time_boot_ms: 0_u32,
30265        firmware_version: 0_u32,
30266        hardware_version: 0_u32,
30267        roll_min: 0.0_f32,
30268        roll_max: 0.0_f32,
30269        pitch_min: 0.0_f32,
30270        pitch_max: 0.0_f32,
30271        yaw_min: 0.0_f32,
30272        yaw_max: 0.0_f32,
30273        cap_flags: GimbalDeviceCapFlags::DEFAULT,
30274        custom_cap_flags: 0_u16,
30275        vendor_name: [0_u8; 32usize],
30276        model_name: [0_u8; 32usize],
30277        custom_name: [0_u8; 32usize],
30278        gimbal_device_id: 0_u8,
30279    };
30280    #[cfg(feature = "arbitrary")]
30281    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30282        use arbitrary::{Arbitrary, Unstructured};
30283        let mut buf = [0u8; 1024];
30284        rng.fill_bytes(&mut buf);
30285        let mut unstructured = Unstructured::new(&buf);
30286        Self::arbitrary(&mut unstructured).unwrap_or_default()
30287    }
30288}
30289impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
30290    fn default() -> Self {
30291        Self::DEFAULT.clone()
30292    }
30293}
30294impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
30295    type Message = MavMessage;
30296    const ID: u32 = 283u32;
30297    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
30298    const EXTRA_CRC: u8 = 74u8;
30299    const ENCODED_LEN: usize = 145usize;
30300    fn deser(
30301        _version: MavlinkVersion,
30302        __input: &[u8],
30303    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30304        let avail_len = __input.len();
30305        let mut payload_buf = [0; Self::ENCODED_LEN];
30306        let mut buf = if avail_len < Self::ENCODED_LEN {
30307            payload_buf[0..avail_len].copy_from_slice(__input);
30308            Bytes::new(&payload_buf)
30309        } else {
30310            Bytes::new(__input)
30311        };
30312        let mut __struct = Self::default();
30313        __struct.uid = buf.get_u64_le();
30314        __struct.time_boot_ms = buf.get_u32_le();
30315        __struct.firmware_version = buf.get_u32_le();
30316        __struct.hardware_version = buf.get_u32_le();
30317        __struct.roll_min = buf.get_f32_le();
30318        __struct.roll_max = buf.get_f32_le();
30319        __struct.pitch_min = buf.get_f32_le();
30320        __struct.pitch_max = buf.get_f32_le();
30321        __struct.yaw_min = buf.get_f32_le();
30322        __struct.yaw_max = buf.get_f32_le();
30323        let tmp = buf.get_u16_le();
30324        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
30325            tmp & GimbalDeviceCapFlags::all().bits(),
30326        )
30327        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30328            flag_type: "GimbalDeviceCapFlags",
30329            value: tmp as u32,
30330        })?;
30331        __struct.custom_cap_flags = buf.get_u16_le();
30332        for v in &mut __struct.vendor_name {
30333            let val = buf.get_u8();
30334            *v = val;
30335        }
30336        for v in &mut __struct.model_name {
30337            let val = buf.get_u8();
30338            *v = val;
30339        }
30340        for v in &mut __struct.custom_name {
30341            let val = buf.get_u8();
30342            *v = val;
30343        }
30344        __struct.gimbal_device_id = buf.get_u8();
30345        Ok(__struct)
30346    }
30347    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30348        let mut __tmp = BytesMut::new(bytes);
30349        #[allow(clippy::absurd_extreme_comparisons)]
30350        #[allow(unused_comparisons)]
30351        if __tmp.remaining() < Self::ENCODED_LEN {
30352            panic!(
30353                "buffer is too small (need {} bytes, but got {})",
30354                Self::ENCODED_LEN,
30355                __tmp.remaining(),
30356            )
30357        }
30358        __tmp.put_u64_le(self.uid);
30359        __tmp.put_u32_le(self.time_boot_ms);
30360        __tmp.put_u32_le(self.firmware_version);
30361        __tmp.put_u32_le(self.hardware_version);
30362        __tmp.put_f32_le(self.roll_min);
30363        __tmp.put_f32_le(self.roll_max);
30364        __tmp.put_f32_le(self.pitch_min);
30365        __tmp.put_f32_le(self.pitch_max);
30366        __tmp.put_f32_le(self.yaw_min);
30367        __tmp.put_f32_le(self.yaw_max);
30368        __tmp.put_u16_le(self.cap_flags.bits());
30369        __tmp.put_u16_le(self.custom_cap_flags);
30370        for val in &self.vendor_name {
30371            __tmp.put_u8(*val);
30372        }
30373        for val in &self.model_name {
30374            __tmp.put_u8(*val);
30375        }
30376        for val in &self.custom_name {
30377            __tmp.put_u8(*val);
30378        }
30379        __tmp.put_u8(self.gimbal_device_id);
30380        if matches!(version, MavlinkVersion::V2) {
30381            let len = __tmp.len();
30382            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30383        } else {
30384            __tmp.len()
30385        }
30386    }
30387}
30388#[doc = "id: 254"]
30389#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
30390#[derive(Debug, Clone, PartialEq)]
30391#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30392#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30393pub struct DEBUG_DATA {
30394    #[doc = "Timestamp (time since system boot)."]
30395    pub time_boot_ms: u32,
30396    #[doc = "DEBUG value"]
30397    pub value: f32,
30398    #[doc = "index of debug variable"]
30399    pub ind: u8,
30400}
30401impl DEBUG_DATA {
30402    pub const ENCODED_LEN: usize = 9usize;
30403    pub const DEFAULT: Self = Self {
30404        time_boot_ms: 0_u32,
30405        value: 0.0_f32,
30406        ind: 0_u8,
30407    };
30408    #[cfg(feature = "arbitrary")]
30409    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30410        use arbitrary::{Arbitrary, Unstructured};
30411        let mut buf = [0u8; 1024];
30412        rng.fill_bytes(&mut buf);
30413        let mut unstructured = Unstructured::new(&buf);
30414        Self::arbitrary(&mut unstructured).unwrap_or_default()
30415    }
30416}
30417impl Default for DEBUG_DATA {
30418    fn default() -> Self {
30419        Self::DEFAULT.clone()
30420    }
30421}
30422impl MessageData for DEBUG_DATA {
30423    type Message = MavMessage;
30424    const ID: u32 = 254u32;
30425    const NAME: &'static str = "DEBUG";
30426    const EXTRA_CRC: u8 = 46u8;
30427    const ENCODED_LEN: usize = 9usize;
30428    fn deser(
30429        _version: MavlinkVersion,
30430        __input: &[u8],
30431    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30432        let avail_len = __input.len();
30433        let mut payload_buf = [0; Self::ENCODED_LEN];
30434        let mut buf = if avail_len < Self::ENCODED_LEN {
30435            payload_buf[0..avail_len].copy_from_slice(__input);
30436            Bytes::new(&payload_buf)
30437        } else {
30438            Bytes::new(__input)
30439        };
30440        let mut __struct = Self::default();
30441        __struct.time_boot_ms = buf.get_u32_le();
30442        __struct.value = buf.get_f32_le();
30443        __struct.ind = buf.get_u8();
30444        Ok(__struct)
30445    }
30446    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30447        let mut __tmp = BytesMut::new(bytes);
30448        #[allow(clippy::absurd_extreme_comparisons)]
30449        #[allow(unused_comparisons)]
30450        if __tmp.remaining() < Self::ENCODED_LEN {
30451            panic!(
30452                "buffer is too small (need {} bytes, but got {})",
30453                Self::ENCODED_LEN,
30454                __tmp.remaining(),
30455            )
30456        }
30457        __tmp.put_u32_le(self.time_boot_ms);
30458        __tmp.put_f32_le(self.value);
30459        __tmp.put_u8(self.ind);
30460        if matches!(version, MavlinkVersion::V2) {
30461            let len = __tmp.len();
30462            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30463        } else {
30464            __tmp.len()
30465        }
30466    }
30467}
30468#[doc = "id: 114"]
30469#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
30470#[derive(Debug, Clone, PartialEq)]
30471#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30472#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30473pub struct HIL_OPTICAL_FLOW_DATA {
30474    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30475    pub time_usec: u64,
30476    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
30477    pub integration_time_us: u32,
30478    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
30479    pub integrated_x: f32,
30480    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
30481    pub integrated_y: f32,
30482    #[doc = "RH rotation around X axis"]
30483    pub integrated_xgyro: f32,
30484    #[doc = "RH rotation around Y axis"]
30485    pub integrated_ygyro: f32,
30486    #[doc = "RH rotation around Z axis"]
30487    pub integrated_zgyro: f32,
30488    #[doc = "Time since the distance was sampled."]
30489    pub time_delta_distance_us: u32,
30490    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
30491    pub distance: f32,
30492    #[doc = "Temperature"]
30493    pub temperature: i16,
30494    #[doc = "Sensor ID"]
30495    pub sensor_id: u8,
30496    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
30497    pub quality: u8,
30498}
30499impl HIL_OPTICAL_FLOW_DATA {
30500    pub const ENCODED_LEN: usize = 44usize;
30501    pub const DEFAULT: Self = Self {
30502        time_usec: 0_u64,
30503        integration_time_us: 0_u32,
30504        integrated_x: 0.0_f32,
30505        integrated_y: 0.0_f32,
30506        integrated_xgyro: 0.0_f32,
30507        integrated_ygyro: 0.0_f32,
30508        integrated_zgyro: 0.0_f32,
30509        time_delta_distance_us: 0_u32,
30510        distance: 0.0_f32,
30511        temperature: 0_i16,
30512        sensor_id: 0_u8,
30513        quality: 0_u8,
30514    };
30515    #[cfg(feature = "arbitrary")]
30516    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30517        use arbitrary::{Arbitrary, Unstructured};
30518        let mut buf = [0u8; 1024];
30519        rng.fill_bytes(&mut buf);
30520        let mut unstructured = Unstructured::new(&buf);
30521        Self::arbitrary(&mut unstructured).unwrap_or_default()
30522    }
30523}
30524impl Default for HIL_OPTICAL_FLOW_DATA {
30525    fn default() -> Self {
30526        Self::DEFAULT.clone()
30527    }
30528}
30529impl MessageData for HIL_OPTICAL_FLOW_DATA {
30530    type Message = MavMessage;
30531    const ID: u32 = 114u32;
30532    const NAME: &'static str = "HIL_OPTICAL_FLOW";
30533    const EXTRA_CRC: u8 = 237u8;
30534    const ENCODED_LEN: usize = 44usize;
30535    fn deser(
30536        _version: MavlinkVersion,
30537        __input: &[u8],
30538    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30539        let avail_len = __input.len();
30540        let mut payload_buf = [0; Self::ENCODED_LEN];
30541        let mut buf = if avail_len < Self::ENCODED_LEN {
30542            payload_buf[0..avail_len].copy_from_slice(__input);
30543            Bytes::new(&payload_buf)
30544        } else {
30545            Bytes::new(__input)
30546        };
30547        let mut __struct = Self::default();
30548        __struct.time_usec = buf.get_u64_le();
30549        __struct.integration_time_us = buf.get_u32_le();
30550        __struct.integrated_x = buf.get_f32_le();
30551        __struct.integrated_y = buf.get_f32_le();
30552        __struct.integrated_xgyro = buf.get_f32_le();
30553        __struct.integrated_ygyro = buf.get_f32_le();
30554        __struct.integrated_zgyro = buf.get_f32_le();
30555        __struct.time_delta_distance_us = buf.get_u32_le();
30556        __struct.distance = buf.get_f32_le();
30557        __struct.temperature = buf.get_i16_le();
30558        __struct.sensor_id = buf.get_u8();
30559        __struct.quality = buf.get_u8();
30560        Ok(__struct)
30561    }
30562    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30563        let mut __tmp = BytesMut::new(bytes);
30564        #[allow(clippy::absurd_extreme_comparisons)]
30565        #[allow(unused_comparisons)]
30566        if __tmp.remaining() < Self::ENCODED_LEN {
30567            panic!(
30568                "buffer is too small (need {} bytes, but got {})",
30569                Self::ENCODED_LEN,
30570                __tmp.remaining(),
30571            )
30572        }
30573        __tmp.put_u64_le(self.time_usec);
30574        __tmp.put_u32_le(self.integration_time_us);
30575        __tmp.put_f32_le(self.integrated_x);
30576        __tmp.put_f32_le(self.integrated_y);
30577        __tmp.put_f32_le(self.integrated_xgyro);
30578        __tmp.put_f32_le(self.integrated_ygyro);
30579        __tmp.put_f32_le(self.integrated_zgyro);
30580        __tmp.put_u32_le(self.time_delta_distance_us);
30581        __tmp.put_f32_le(self.distance);
30582        __tmp.put_i16_le(self.temperature);
30583        __tmp.put_u8(self.sensor_id);
30584        __tmp.put_u8(self.quality);
30585        if matches!(version, MavlinkVersion::V2) {
30586            let len = __tmp.len();
30587            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30588        } else {
30589            __tmp.len()
30590        }
30591    }
30592}
30593#[doc = "id: 247"]
30594#[doc = "Information about a potential collision."]
30595#[derive(Debug, Clone, PartialEq)]
30596#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30597#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30598pub struct COLLISION_DATA {
30599    #[doc = "Unique identifier, domain based on src field"]
30600    pub id: u32,
30601    #[doc = "Estimated time until collision occurs"]
30602    pub time_to_minimum_delta: f32,
30603    #[doc = "Closest vertical distance between vehicle and object"]
30604    pub altitude_minimum_delta: f32,
30605    #[doc = "Closest horizontal distance between vehicle and object"]
30606    pub horizontal_minimum_delta: f32,
30607    #[doc = "Collision data source"]
30608    pub src: MavCollisionSrc,
30609    #[doc = "Action that is being taken to avoid this collision"]
30610    pub action: MavCollisionAction,
30611    #[doc = "How concerned the aircraft is about this collision"]
30612    pub threat_level: MavCollisionThreatLevel,
30613}
30614impl COLLISION_DATA {
30615    pub const ENCODED_LEN: usize = 19usize;
30616    pub const DEFAULT: Self = Self {
30617        id: 0_u32,
30618        time_to_minimum_delta: 0.0_f32,
30619        altitude_minimum_delta: 0.0_f32,
30620        horizontal_minimum_delta: 0.0_f32,
30621        src: MavCollisionSrc::DEFAULT,
30622        action: MavCollisionAction::DEFAULT,
30623        threat_level: MavCollisionThreatLevel::DEFAULT,
30624    };
30625    #[cfg(feature = "arbitrary")]
30626    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30627        use arbitrary::{Arbitrary, Unstructured};
30628        let mut buf = [0u8; 1024];
30629        rng.fill_bytes(&mut buf);
30630        let mut unstructured = Unstructured::new(&buf);
30631        Self::arbitrary(&mut unstructured).unwrap_or_default()
30632    }
30633}
30634impl Default for COLLISION_DATA {
30635    fn default() -> Self {
30636        Self::DEFAULT.clone()
30637    }
30638}
30639impl MessageData for COLLISION_DATA {
30640    type Message = MavMessage;
30641    const ID: u32 = 247u32;
30642    const NAME: &'static str = "COLLISION";
30643    const EXTRA_CRC: u8 = 81u8;
30644    const ENCODED_LEN: usize = 19usize;
30645    fn deser(
30646        _version: MavlinkVersion,
30647        __input: &[u8],
30648    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30649        let avail_len = __input.len();
30650        let mut payload_buf = [0; Self::ENCODED_LEN];
30651        let mut buf = if avail_len < Self::ENCODED_LEN {
30652            payload_buf[0..avail_len].copy_from_slice(__input);
30653            Bytes::new(&payload_buf)
30654        } else {
30655            Bytes::new(__input)
30656        };
30657        let mut __struct = Self::default();
30658        __struct.id = buf.get_u32_le();
30659        __struct.time_to_minimum_delta = buf.get_f32_le();
30660        __struct.altitude_minimum_delta = buf.get_f32_le();
30661        __struct.horizontal_minimum_delta = buf.get_f32_le();
30662        let tmp = buf.get_u8();
30663        __struct.src =
30664            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30665                enum_type: "MavCollisionSrc",
30666                value: tmp as u32,
30667            })?;
30668        let tmp = buf.get_u8();
30669        __struct.action =
30670            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30671                enum_type: "MavCollisionAction",
30672                value: tmp as u32,
30673            })?;
30674        let tmp = buf.get_u8();
30675        __struct.threat_level =
30676            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30677                enum_type: "MavCollisionThreatLevel",
30678                value: tmp as u32,
30679            })?;
30680        Ok(__struct)
30681    }
30682    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30683        let mut __tmp = BytesMut::new(bytes);
30684        #[allow(clippy::absurd_extreme_comparisons)]
30685        #[allow(unused_comparisons)]
30686        if __tmp.remaining() < Self::ENCODED_LEN {
30687            panic!(
30688                "buffer is too small (need {} bytes, but got {})",
30689                Self::ENCODED_LEN,
30690                __tmp.remaining(),
30691            )
30692        }
30693        __tmp.put_u32_le(self.id);
30694        __tmp.put_f32_le(self.time_to_minimum_delta);
30695        __tmp.put_f32_le(self.altitude_minimum_delta);
30696        __tmp.put_f32_le(self.horizontal_minimum_delta);
30697        __tmp.put_u8(self.src as u8);
30698        __tmp.put_u8(self.action as u8);
30699        __tmp.put_u8(self.threat_level as u8);
30700        if matches!(version, MavlinkVersion::V2) {
30701            let len = __tmp.len();
30702            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30703        } else {
30704            __tmp.len()
30705        }
30706    }
30707}
30708#[doc = "id: 331"]
30709#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
30710#[derive(Debug, Clone, PartialEq)]
30711#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30712#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30713pub struct ODOMETRY_DATA {
30714    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30715    pub time_usec: u64,
30716    #[doc = "X Position"]
30717    pub x: f32,
30718    #[doc = "Y Position"]
30719    pub y: f32,
30720    #[doc = "Z Position"]
30721    pub z: f32,
30722    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
30723    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30724    pub q: [f32; 4],
30725    #[doc = "X linear speed"]
30726    pub vx: f32,
30727    #[doc = "Y linear speed"]
30728    pub vy: f32,
30729    #[doc = "Z linear speed"]
30730    pub vz: f32,
30731    #[doc = "Roll angular speed"]
30732    pub rollspeed: f32,
30733    #[doc = "Pitch angular speed"]
30734    pub pitchspeed: f32,
30735    #[doc = "Yaw angular speed"]
30736    pub yawspeed: f32,
30737    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
30738    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30739    pub pose_covariance: [f32; 21],
30740    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
30741    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30742    pub velocity_covariance: [f32; 21],
30743    #[doc = "Coordinate frame of reference for the pose data."]
30744    pub frame_id: MavFrame,
30745    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
30746    pub child_frame_id: MavFrame,
30747    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
30748    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30749    pub reset_counter: u8,
30750    #[doc = "Type of estimator that is providing the odometry."]
30751    #[cfg_attr(feature = "serde", serde(default))]
30752    pub estimator_type: MavEstimatorType,
30753    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
30754    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30755    pub quality: i8,
30756}
30757impl ODOMETRY_DATA {
30758    pub const ENCODED_LEN: usize = 233usize;
30759    pub const DEFAULT: Self = Self {
30760        time_usec: 0_u64,
30761        x: 0.0_f32,
30762        y: 0.0_f32,
30763        z: 0.0_f32,
30764        q: [0.0_f32; 4usize],
30765        vx: 0.0_f32,
30766        vy: 0.0_f32,
30767        vz: 0.0_f32,
30768        rollspeed: 0.0_f32,
30769        pitchspeed: 0.0_f32,
30770        yawspeed: 0.0_f32,
30771        pose_covariance: [0.0_f32; 21usize],
30772        velocity_covariance: [0.0_f32; 21usize],
30773        frame_id: MavFrame::DEFAULT,
30774        child_frame_id: MavFrame::DEFAULT,
30775        reset_counter: 0_u8,
30776        estimator_type: MavEstimatorType::DEFAULT,
30777        quality: 0_i8,
30778    };
30779    #[cfg(feature = "arbitrary")]
30780    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30781        use arbitrary::{Arbitrary, Unstructured};
30782        let mut buf = [0u8; 1024];
30783        rng.fill_bytes(&mut buf);
30784        let mut unstructured = Unstructured::new(&buf);
30785        Self::arbitrary(&mut unstructured).unwrap_or_default()
30786    }
30787}
30788impl Default for ODOMETRY_DATA {
30789    fn default() -> Self {
30790        Self::DEFAULT.clone()
30791    }
30792}
30793impl MessageData for ODOMETRY_DATA {
30794    type Message = MavMessage;
30795    const ID: u32 = 331u32;
30796    const NAME: &'static str = "ODOMETRY";
30797    const EXTRA_CRC: u8 = 91u8;
30798    const ENCODED_LEN: usize = 233usize;
30799    fn deser(
30800        _version: MavlinkVersion,
30801        __input: &[u8],
30802    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30803        let avail_len = __input.len();
30804        let mut payload_buf = [0; Self::ENCODED_LEN];
30805        let mut buf = if avail_len < Self::ENCODED_LEN {
30806            payload_buf[0..avail_len].copy_from_slice(__input);
30807            Bytes::new(&payload_buf)
30808        } else {
30809            Bytes::new(__input)
30810        };
30811        let mut __struct = Self::default();
30812        __struct.time_usec = buf.get_u64_le();
30813        __struct.x = buf.get_f32_le();
30814        __struct.y = buf.get_f32_le();
30815        __struct.z = buf.get_f32_le();
30816        for v in &mut __struct.q {
30817            let val = buf.get_f32_le();
30818            *v = val;
30819        }
30820        __struct.vx = buf.get_f32_le();
30821        __struct.vy = buf.get_f32_le();
30822        __struct.vz = buf.get_f32_le();
30823        __struct.rollspeed = buf.get_f32_le();
30824        __struct.pitchspeed = buf.get_f32_le();
30825        __struct.yawspeed = buf.get_f32_le();
30826        for v in &mut __struct.pose_covariance {
30827            let val = buf.get_f32_le();
30828            *v = val;
30829        }
30830        for v in &mut __struct.velocity_covariance {
30831            let val = buf.get_f32_le();
30832            *v = val;
30833        }
30834        let tmp = buf.get_u8();
30835        __struct.frame_id =
30836            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30837                enum_type: "MavFrame",
30838                value: tmp as u32,
30839            })?;
30840        let tmp = buf.get_u8();
30841        __struct.child_frame_id =
30842            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30843                enum_type: "MavFrame",
30844                value: tmp as u32,
30845            })?;
30846        __struct.reset_counter = buf.get_u8();
30847        let tmp = buf.get_u8();
30848        __struct.estimator_type =
30849            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30850                enum_type: "MavEstimatorType",
30851                value: tmp as u32,
30852            })?;
30853        __struct.quality = buf.get_i8();
30854        Ok(__struct)
30855    }
30856    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30857        let mut __tmp = BytesMut::new(bytes);
30858        #[allow(clippy::absurd_extreme_comparisons)]
30859        #[allow(unused_comparisons)]
30860        if __tmp.remaining() < Self::ENCODED_LEN {
30861            panic!(
30862                "buffer is too small (need {} bytes, but got {})",
30863                Self::ENCODED_LEN,
30864                __tmp.remaining(),
30865            )
30866        }
30867        __tmp.put_u64_le(self.time_usec);
30868        __tmp.put_f32_le(self.x);
30869        __tmp.put_f32_le(self.y);
30870        __tmp.put_f32_le(self.z);
30871        for val in &self.q {
30872            __tmp.put_f32_le(*val);
30873        }
30874        __tmp.put_f32_le(self.vx);
30875        __tmp.put_f32_le(self.vy);
30876        __tmp.put_f32_le(self.vz);
30877        __tmp.put_f32_le(self.rollspeed);
30878        __tmp.put_f32_le(self.pitchspeed);
30879        __tmp.put_f32_le(self.yawspeed);
30880        for val in &self.pose_covariance {
30881            __tmp.put_f32_le(*val);
30882        }
30883        for val in &self.velocity_covariance {
30884            __tmp.put_f32_le(*val);
30885        }
30886        __tmp.put_u8(self.frame_id as u8);
30887        __tmp.put_u8(self.child_frame_id as u8);
30888        __tmp.put_u8(self.reset_counter);
30889        __tmp.put_u8(self.estimator_type as u8);
30890        __tmp.put_i8(self.quality);
30891        if matches!(version, MavlinkVersion::V2) {
30892            let len = __tmp.len();
30893            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30894        } else {
30895            __tmp.len()
30896        }
30897    }
30898}
30899#[doc = "id: 120"]
30900#[doc = "Reply to LOG_REQUEST_DATA."]
30901#[derive(Debug, Clone, PartialEq)]
30902#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30903#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30904pub struct LOG_DATA_DATA {
30905    #[doc = "Offset into the log"]
30906    pub ofs: u32,
30907    #[doc = "Log id (from LOG_ENTRY reply)"]
30908    pub id: u16,
30909    #[doc = "Number of bytes (zero for end of log)"]
30910    pub count: u8,
30911    #[doc = "log data"]
30912    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30913    pub data: [u8; 90],
30914}
30915impl LOG_DATA_DATA {
30916    pub const ENCODED_LEN: usize = 97usize;
30917    pub const DEFAULT: Self = Self {
30918        ofs: 0_u32,
30919        id: 0_u16,
30920        count: 0_u8,
30921        data: [0_u8; 90usize],
30922    };
30923    #[cfg(feature = "arbitrary")]
30924    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30925        use arbitrary::{Arbitrary, Unstructured};
30926        let mut buf = [0u8; 1024];
30927        rng.fill_bytes(&mut buf);
30928        let mut unstructured = Unstructured::new(&buf);
30929        Self::arbitrary(&mut unstructured).unwrap_or_default()
30930    }
30931}
30932impl Default for LOG_DATA_DATA {
30933    fn default() -> Self {
30934        Self::DEFAULT.clone()
30935    }
30936}
30937impl MessageData for LOG_DATA_DATA {
30938    type Message = MavMessage;
30939    const ID: u32 = 120u32;
30940    const NAME: &'static str = "LOG_DATA";
30941    const EXTRA_CRC: u8 = 134u8;
30942    const ENCODED_LEN: usize = 97usize;
30943    fn deser(
30944        _version: MavlinkVersion,
30945        __input: &[u8],
30946    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30947        let avail_len = __input.len();
30948        let mut payload_buf = [0; Self::ENCODED_LEN];
30949        let mut buf = if avail_len < Self::ENCODED_LEN {
30950            payload_buf[0..avail_len].copy_from_slice(__input);
30951            Bytes::new(&payload_buf)
30952        } else {
30953            Bytes::new(__input)
30954        };
30955        let mut __struct = Self::default();
30956        __struct.ofs = buf.get_u32_le();
30957        __struct.id = buf.get_u16_le();
30958        __struct.count = buf.get_u8();
30959        for v in &mut __struct.data {
30960            let val = buf.get_u8();
30961            *v = val;
30962        }
30963        Ok(__struct)
30964    }
30965    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30966        let mut __tmp = BytesMut::new(bytes);
30967        #[allow(clippy::absurd_extreme_comparisons)]
30968        #[allow(unused_comparisons)]
30969        if __tmp.remaining() < Self::ENCODED_LEN {
30970            panic!(
30971                "buffer is too small (need {} bytes, but got {})",
30972                Self::ENCODED_LEN,
30973                __tmp.remaining(),
30974            )
30975        }
30976        __tmp.put_u32_le(self.ofs);
30977        __tmp.put_u16_le(self.id);
30978        __tmp.put_u8(self.count);
30979        for val in &self.data {
30980            __tmp.put_u8(*val);
30981        }
30982        if matches!(version, MavlinkVersion::V2) {
30983            let len = __tmp.len();
30984            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30985        } else {
30986            __tmp.len()
30987        }
30988    }
30989}
30990#[doc = "id: 260"]
30991#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
30992#[derive(Debug, Clone, PartialEq)]
30993#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30994#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30995pub struct CAMERA_SETTINGS_DATA {
30996    #[doc = "Timestamp (time since system boot)."]
30997    pub time_boot_ms: u32,
30998    #[doc = "Camera mode"]
30999    pub mode_id: CameraMode,
31000    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
31001    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31002    pub zoomLevel: f32,
31003    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
31004    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31005    pub focusLevel: f32,
31006    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31007    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31008    pub camera_device_id: u8,
31009}
31010impl CAMERA_SETTINGS_DATA {
31011    pub const ENCODED_LEN: usize = 14usize;
31012    pub const DEFAULT: Self = Self {
31013        time_boot_ms: 0_u32,
31014        mode_id: CameraMode::DEFAULT,
31015        zoomLevel: 0.0_f32,
31016        focusLevel: 0.0_f32,
31017        camera_device_id: 0_u8,
31018    };
31019    #[cfg(feature = "arbitrary")]
31020    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31021        use arbitrary::{Arbitrary, Unstructured};
31022        let mut buf = [0u8; 1024];
31023        rng.fill_bytes(&mut buf);
31024        let mut unstructured = Unstructured::new(&buf);
31025        Self::arbitrary(&mut unstructured).unwrap_or_default()
31026    }
31027}
31028impl Default for CAMERA_SETTINGS_DATA {
31029    fn default() -> Self {
31030        Self::DEFAULT.clone()
31031    }
31032}
31033impl MessageData for CAMERA_SETTINGS_DATA {
31034    type Message = MavMessage;
31035    const ID: u32 = 260u32;
31036    const NAME: &'static str = "CAMERA_SETTINGS";
31037    const EXTRA_CRC: u8 = 146u8;
31038    const ENCODED_LEN: usize = 14usize;
31039    fn deser(
31040        _version: MavlinkVersion,
31041        __input: &[u8],
31042    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31043        let avail_len = __input.len();
31044        let mut payload_buf = [0; Self::ENCODED_LEN];
31045        let mut buf = if avail_len < Self::ENCODED_LEN {
31046            payload_buf[0..avail_len].copy_from_slice(__input);
31047            Bytes::new(&payload_buf)
31048        } else {
31049            Bytes::new(__input)
31050        };
31051        let mut __struct = Self::default();
31052        __struct.time_boot_ms = buf.get_u32_le();
31053        let tmp = buf.get_u8();
31054        __struct.mode_id =
31055            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31056                enum_type: "CameraMode",
31057                value: tmp as u32,
31058            })?;
31059        __struct.zoomLevel = buf.get_f32_le();
31060        __struct.focusLevel = buf.get_f32_le();
31061        __struct.camera_device_id = buf.get_u8();
31062        Ok(__struct)
31063    }
31064    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31065        let mut __tmp = BytesMut::new(bytes);
31066        #[allow(clippy::absurd_extreme_comparisons)]
31067        #[allow(unused_comparisons)]
31068        if __tmp.remaining() < Self::ENCODED_LEN {
31069            panic!(
31070                "buffer is too small (need {} bytes, but got {})",
31071                Self::ENCODED_LEN,
31072                __tmp.remaining(),
31073            )
31074        }
31075        __tmp.put_u32_le(self.time_boot_ms);
31076        __tmp.put_u8(self.mode_id as u8);
31077        __tmp.put_f32_le(self.zoomLevel);
31078        __tmp.put_f32_le(self.focusLevel);
31079        __tmp.put_u8(self.camera_device_id);
31080        if matches!(version, MavlinkVersion::V2) {
31081            let len = __tmp.len();
31082            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31083        } else {
31084            __tmp.len()
31085        }
31086    }
31087}
31088#[doc = "id: 410"]
31089#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
31090#[derive(Debug, Clone, PartialEq)]
31091#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31092#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31093pub struct EVENT_DATA {
31094    #[doc = "Event ID (as defined in the component metadata)"]
31095    pub id: u32,
31096    #[doc = "Timestamp (time since system boot when the event happened)."]
31097    pub event_time_boot_ms: u32,
31098    #[doc = "Sequence number."]
31099    pub sequence: u16,
31100    #[doc = "Component ID"]
31101    pub destination_component: u8,
31102    #[doc = "System ID"]
31103    pub destination_system: u8,
31104    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
31105    pub log_levels: u8,
31106    #[doc = "Arguments (depend on event ID)."]
31107    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31108    pub arguments: [u8; 40],
31109}
31110impl EVENT_DATA {
31111    pub const ENCODED_LEN: usize = 53usize;
31112    pub const DEFAULT: Self = Self {
31113        id: 0_u32,
31114        event_time_boot_ms: 0_u32,
31115        sequence: 0_u16,
31116        destination_component: 0_u8,
31117        destination_system: 0_u8,
31118        log_levels: 0_u8,
31119        arguments: [0_u8; 40usize],
31120    };
31121    #[cfg(feature = "arbitrary")]
31122    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31123        use arbitrary::{Arbitrary, Unstructured};
31124        let mut buf = [0u8; 1024];
31125        rng.fill_bytes(&mut buf);
31126        let mut unstructured = Unstructured::new(&buf);
31127        Self::arbitrary(&mut unstructured).unwrap_or_default()
31128    }
31129}
31130impl Default for EVENT_DATA {
31131    fn default() -> Self {
31132        Self::DEFAULT.clone()
31133    }
31134}
31135impl MessageData for EVENT_DATA {
31136    type Message = MavMessage;
31137    const ID: u32 = 410u32;
31138    const NAME: &'static str = "EVENT";
31139    const EXTRA_CRC: u8 = 160u8;
31140    const ENCODED_LEN: usize = 53usize;
31141    fn deser(
31142        _version: MavlinkVersion,
31143        __input: &[u8],
31144    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31145        let avail_len = __input.len();
31146        let mut payload_buf = [0; Self::ENCODED_LEN];
31147        let mut buf = if avail_len < Self::ENCODED_LEN {
31148            payload_buf[0..avail_len].copy_from_slice(__input);
31149            Bytes::new(&payload_buf)
31150        } else {
31151            Bytes::new(__input)
31152        };
31153        let mut __struct = Self::default();
31154        __struct.id = buf.get_u32_le();
31155        __struct.event_time_boot_ms = buf.get_u32_le();
31156        __struct.sequence = buf.get_u16_le();
31157        __struct.destination_component = buf.get_u8();
31158        __struct.destination_system = buf.get_u8();
31159        __struct.log_levels = buf.get_u8();
31160        for v in &mut __struct.arguments {
31161            let val = buf.get_u8();
31162            *v = val;
31163        }
31164        Ok(__struct)
31165    }
31166    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31167        let mut __tmp = BytesMut::new(bytes);
31168        #[allow(clippy::absurd_extreme_comparisons)]
31169        #[allow(unused_comparisons)]
31170        if __tmp.remaining() < Self::ENCODED_LEN {
31171            panic!(
31172                "buffer is too small (need {} bytes, but got {})",
31173                Self::ENCODED_LEN,
31174                __tmp.remaining(),
31175            )
31176        }
31177        __tmp.put_u32_le(self.id);
31178        __tmp.put_u32_le(self.event_time_boot_ms);
31179        __tmp.put_u16_le(self.sequence);
31180        __tmp.put_u8(self.destination_component);
31181        __tmp.put_u8(self.destination_system);
31182        __tmp.put_u8(self.log_levels);
31183        for val in &self.arguments {
31184            __tmp.put_u8(*val);
31185        }
31186        if matches!(version, MavlinkVersion::V2) {
31187            let len = __tmp.len();
31188            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31189        } else {
31190            __tmp.len()
31191        }
31192    }
31193}
31194#[doc = "id: 4"]
31195#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
31196#[derive(Debug, Clone, PartialEq)]
31197#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31198#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31199pub struct PING_DATA {
31200    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31201    pub time_usec: u64,
31202    #[doc = "PING sequence"]
31203    pub seq: u32,
31204    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
31205    pub target_system: u8,
31206    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
31207    pub target_component: u8,
31208}
31209impl PING_DATA {
31210    pub const ENCODED_LEN: usize = 14usize;
31211    pub const DEFAULT: Self = Self {
31212        time_usec: 0_u64,
31213        seq: 0_u32,
31214        target_system: 0_u8,
31215        target_component: 0_u8,
31216    };
31217    #[cfg(feature = "arbitrary")]
31218    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31219        use arbitrary::{Arbitrary, Unstructured};
31220        let mut buf = [0u8; 1024];
31221        rng.fill_bytes(&mut buf);
31222        let mut unstructured = Unstructured::new(&buf);
31223        Self::arbitrary(&mut unstructured).unwrap_or_default()
31224    }
31225}
31226impl Default for PING_DATA {
31227    fn default() -> Self {
31228        Self::DEFAULT.clone()
31229    }
31230}
31231impl MessageData for PING_DATA {
31232    type Message = MavMessage;
31233    const ID: u32 = 4u32;
31234    const NAME: &'static str = "PING";
31235    const EXTRA_CRC: u8 = 237u8;
31236    const ENCODED_LEN: usize = 14usize;
31237    fn deser(
31238        _version: MavlinkVersion,
31239        __input: &[u8],
31240    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31241        let avail_len = __input.len();
31242        let mut payload_buf = [0; Self::ENCODED_LEN];
31243        let mut buf = if avail_len < Self::ENCODED_LEN {
31244            payload_buf[0..avail_len].copy_from_slice(__input);
31245            Bytes::new(&payload_buf)
31246        } else {
31247            Bytes::new(__input)
31248        };
31249        let mut __struct = Self::default();
31250        __struct.time_usec = buf.get_u64_le();
31251        __struct.seq = buf.get_u32_le();
31252        __struct.target_system = buf.get_u8();
31253        __struct.target_component = buf.get_u8();
31254        Ok(__struct)
31255    }
31256    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31257        let mut __tmp = BytesMut::new(bytes);
31258        #[allow(clippy::absurd_extreme_comparisons)]
31259        #[allow(unused_comparisons)]
31260        if __tmp.remaining() < Self::ENCODED_LEN {
31261            panic!(
31262                "buffer is too small (need {} bytes, but got {})",
31263                Self::ENCODED_LEN,
31264                __tmp.remaining(),
31265            )
31266        }
31267        __tmp.put_u64_le(self.time_usec);
31268        __tmp.put_u32_le(self.seq);
31269        __tmp.put_u8(self.target_system);
31270        __tmp.put_u8(self.target_component);
31271        if matches!(version, MavlinkVersion::V2) {
31272            let len = __tmp.len();
31273            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31274        } else {
31275            __tmp.len()
31276        }
31277    }
31278}
31279#[doc = "id: 27"]
31280#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
31281#[derive(Debug, Clone, PartialEq)]
31282#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31283#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31284pub struct RAW_IMU_DATA {
31285    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31286    pub time_usec: u64,
31287    #[doc = "X acceleration (raw)"]
31288    pub xacc: i16,
31289    #[doc = "Y acceleration (raw)"]
31290    pub yacc: i16,
31291    #[doc = "Z acceleration (raw)"]
31292    pub zacc: i16,
31293    #[doc = "Angular speed around X axis (raw)"]
31294    pub xgyro: i16,
31295    #[doc = "Angular speed around Y axis (raw)"]
31296    pub ygyro: i16,
31297    #[doc = "Angular speed around Z axis (raw)"]
31298    pub zgyro: i16,
31299    #[doc = "X Magnetic field (raw)"]
31300    pub xmag: i16,
31301    #[doc = "Y Magnetic field (raw)"]
31302    pub ymag: i16,
31303    #[doc = "Z Magnetic field (raw)"]
31304    pub zmag: i16,
31305    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
31306    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31307    pub id: u8,
31308    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
31309    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31310    pub temperature: i16,
31311}
31312impl RAW_IMU_DATA {
31313    pub const ENCODED_LEN: usize = 29usize;
31314    pub const DEFAULT: Self = Self {
31315        time_usec: 0_u64,
31316        xacc: 0_i16,
31317        yacc: 0_i16,
31318        zacc: 0_i16,
31319        xgyro: 0_i16,
31320        ygyro: 0_i16,
31321        zgyro: 0_i16,
31322        xmag: 0_i16,
31323        ymag: 0_i16,
31324        zmag: 0_i16,
31325        id: 0_u8,
31326        temperature: 0_i16,
31327    };
31328    #[cfg(feature = "arbitrary")]
31329    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31330        use arbitrary::{Arbitrary, Unstructured};
31331        let mut buf = [0u8; 1024];
31332        rng.fill_bytes(&mut buf);
31333        let mut unstructured = Unstructured::new(&buf);
31334        Self::arbitrary(&mut unstructured).unwrap_or_default()
31335    }
31336}
31337impl Default for RAW_IMU_DATA {
31338    fn default() -> Self {
31339        Self::DEFAULT.clone()
31340    }
31341}
31342impl MessageData for RAW_IMU_DATA {
31343    type Message = MavMessage;
31344    const ID: u32 = 27u32;
31345    const NAME: &'static str = "RAW_IMU";
31346    const EXTRA_CRC: u8 = 144u8;
31347    const ENCODED_LEN: usize = 29usize;
31348    fn deser(
31349        _version: MavlinkVersion,
31350        __input: &[u8],
31351    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31352        let avail_len = __input.len();
31353        let mut payload_buf = [0; Self::ENCODED_LEN];
31354        let mut buf = if avail_len < Self::ENCODED_LEN {
31355            payload_buf[0..avail_len].copy_from_slice(__input);
31356            Bytes::new(&payload_buf)
31357        } else {
31358            Bytes::new(__input)
31359        };
31360        let mut __struct = Self::default();
31361        __struct.time_usec = buf.get_u64_le();
31362        __struct.xacc = buf.get_i16_le();
31363        __struct.yacc = buf.get_i16_le();
31364        __struct.zacc = buf.get_i16_le();
31365        __struct.xgyro = buf.get_i16_le();
31366        __struct.ygyro = buf.get_i16_le();
31367        __struct.zgyro = buf.get_i16_le();
31368        __struct.xmag = buf.get_i16_le();
31369        __struct.ymag = buf.get_i16_le();
31370        __struct.zmag = buf.get_i16_le();
31371        __struct.id = buf.get_u8();
31372        __struct.temperature = buf.get_i16_le();
31373        Ok(__struct)
31374    }
31375    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31376        let mut __tmp = BytesMut::new(bytes);
31377        #[allow(clippy::absurd_extreme_comparisons)]
31378        #[allow(unused_comparisons)]
31379        if __tmp.remaining() < Self::ENCODED_LEN {
31380            panic!(
31381                "buffer is too small (need {} bytes, but got {})",
31382                Self::ENCODED_LEN,
31383                __tmp.remaining(),
31384            )
31385        }
31386        __tmp.put_u64_le(self.time_usec);
31387        __tmp.put_i16_le(self.xacc);
31388        __tmp.put_i16_le(self.yacc);
31389        __tmp.put_i16_le(self.zacc);
31390        __tmp.put_i16_le(self.xgyro);
31391        __tmp.put_i16_le(self.ygyro);
31392        __tmp.put_i16_le(self.zgyro);
31393        __tmp.put_i16_le(self.xmag);
31394        __tmp.put_i16_le(self.ymag);
31395        __tmp.put_i16_le(self.zmag);
31396        __tmp.put_u8(self.id);
31397        __tmp.put_i16_le(self.temperature);
31398        if matches!(version, MavlinkVersion::V2) {
31399            let len = __tmp.len();
31400            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31401        } else {
31402            __tmp.len()
31403        }
31404    }
31405}
31406#[derive(Clone, PartialEq, Debug)]
31407#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31408#[cfg_attr(feature = "serde", serde(tag = "type"))]
31409#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31410#[repr(u32)]
31411pub enum MavMessage {
31412    COMMAND_INT(COMMAND_INT_DATA),
31413    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
31414    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
31415    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
31416    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
31417    AIS_VESSEL(AIS_VESSEL_DATA),
31418    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
31419    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
31420    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
31421    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
31422    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
31423    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
31424    SYS_STATUS(SYS_STATUS_DATA),
31425    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
31426    AUTH_KEY(AUTH_KEY_DATA),
31427    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
31428    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
31429    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
31430    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
31431    AVSS_DRONE_IMU(AVSS_DRONE_IMU_DATA),
31432    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
31433    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
31434    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
31435    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
31436    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
31437    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
31438    SCALED_IMU3(SCALED_IMU3_DATA),
31439    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
31440    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
31441    GPS_INPUT(GPS_INPUT_DATA),
31442    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
31443    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
31444    RAW_RPM(RAW_RPM_DATA),
31445    HIL_GPS(HIL_GPS_DATA),
31446    POWER_STATUS(POWER_STATUS_DATA),
31447    EFI_STATUS(EFI_STATUS_DATA),
31448    MEMORY_VECT(MEMORY_VECT_DATA),
31449    LOG_ENTRY(LOG_ENTRY_DATA),
31450    REQUEST_EVENT(REQUEST_EVENT_DATA),
31451    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
31452    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
31453    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
31454    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
31455    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
31456    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
31457    BATTERY_STATUS(BATTERY_STATUS_DATA),
31458    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
31459    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
31460    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
31461    ATTITUDE(ATTITUDE_DATA),
31462    TERRAIN_DATA(TERRAIN_DATA_DATA),
31463    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
31464    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
31465    CANFD_FRAME(CANFD_FRAME_DATA),
31466    HIL_STATE(HIL_STATE_DATA),
31467    MISSION_CURRENT(MISSION_CURRENT_DATA),
31468    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
31469    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
31470    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
31471    HIL_SENSOR(HIL_SENSOR_DATA),
31472    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
31473    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
31474    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
31475    FUEL_STATUS(FUEL_STATUS_DATA),
31476    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
31477    HIGHRES_IMU(HIGHRES_IMU_DATA),
31478    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
31479    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
31480    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
31481    VIBRATION(VIBRATION_DATA),
31482    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
31483    LANDING_TARGET(LANDING_TARGET_DATA),
31484    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
31485    PLAY_TUNE(PLAY_TUNE_DATA),
31486    GPS_STATUS(GPS_STATUS_DATA),
31487    MISSION_COUNT(MISSION_COUNT_DATA),
31488    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
31489    PARAM_VALUE(PARAM_VALUE_DATA),
31490    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
31491    AVSS_DRONE_POSITION(AVSS_DRONE_POSITION_DATA),
31492    PARAM_SET(PARAM_SET_DATA),
31493    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
31494    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
31495    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
31496    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
31497    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
31498    SETUP_SIGNING(SETUP_SIGNING_DATA),
31499    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
31500    TUNNEL(TUNNEL_DATA),
31501    COMMAND_LONG(COMMAND_LONG_DATA),
31502    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
31503    VFR_HUD(VFR_HUD_DATA),
31504    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
31505    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
31506    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
31507    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
31508    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
31509    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
31510    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
31511    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
31512    SYSTEM_TIME(SYSTEM_TIME_DATA),
31513    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
31514    GPS_RTK(GPS_RTK_DATA),
31515    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
31516    SIM_STATE(SIM_STATE_DATA),
31517    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
31518    V2_EXTENSION(V2_EXTENSION_DATA),
31519    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
31520    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
31521    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
31522    DEBUG_VECT(DEBUG_VECT_DATA),
31523    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
31524    BATTERY_INFO(BATTERY_INFO_DATA),
31525    CAN_FRAME(CAN_FRAME_DATA),
31526    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
31527    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
31528    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
31529    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
31530    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
31531    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
31532    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
31533    HIGH_LATENCY(HIGH_LATENCY_DATA),
31534    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
31535    LOGGING_ACK(LOGGING_ACK_DATA),
31536    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
31537    SET_MODE(SET_MODE_DATA),
31538    RC_CHANNELS(RC_CHANNELS_DATA),
31539    ESC_INFO(ESC_INFO_DATA),
31540    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
31541    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
31542    LOGGING_DATA(LOGGING_DATA_DATA),
31543    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
31544    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
31545    AVSS_PRS_SYS_STATUS(AVSS_PRS_SYS_STATUS_DATA),
31546    STATUSTEXT(STATUSTEXT_DATA),
31547    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
31548    GPS_RAW_INT(GPS_RAW_INT_DATA),
31549    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
31550    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
31551    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
31552    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
31553    RAW_PRESSURE(RAW_PRESSURE_DATA),
31554    GPS2_RAW(GPS2_RAW_DATA),
31555    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
31556    ESC_STATUS(ESC_STATUS_DATA),
31557    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
31558    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
31559    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
31560    HIL_CONTROLS(HIL_CONTROLS_DATA),
31561    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
31562    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
31563    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
31564    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
31565    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
31566    HEARTBEAT(HEARTBEAT_DATA),
31567    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
31568    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
31569    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
31570    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
31571    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
31572    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
31573    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
31574    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
31575    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
31576    ALTITUDE(ALTITUDE_DATA),
31577    GPS2_RTK(GPS2_RTK_DATA),
31578    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
31579    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
31580    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
31581    MISSION_ITEM(MISSION_ITEM_DATA),
31582    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
31583    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
31584    LOG_ERASE(LOG_ERASE_DATA),
31585    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
31586    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
31587    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
31588    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
31589    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
31590    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
31591    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
31592    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
31593    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
31594    COMMAND_ACK(COMMAND_ACK_DATA),
31595    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
31596    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
31597    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
31598    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
31599    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
31600    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
31601    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
31602    SCALED_IMU2(SCALED_IMU2_DATA),
31603    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
31604    TIMESYNC(TIMESYNC_DATA),
31605    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
31606    FENCE_STATUS(FENCE_STATUS_DATA),
31607    RADIO_STATUS(RADIO_STATUS_DATA),
31608    CURRENT_MODE(CURRENT_MODE_DATA),
31609    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
31610    WIND_COV(WIND_COV_DATA),
31611    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
31612    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
31613    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
31614    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
31615    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
31616    MISSION_REQUEST(MISSION_REQUEST_DATA),
31617    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
31618    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
31619    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
31620    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
31621    WINCH_STATUS(WINCH_STATUS_DATA),
31622    MISSION_ACK(MISSION_ACK_DATA),
31623    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
31624    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
31625    AVSS_DRONE_OPERATION_MODE(AVSS_DRONE_OPERATION_MODE_DATA),
31626    SCALED_IMU(SCALED_IMU_DATA),
31627    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
31628    DATA_STREAM(DATA_STREAM_DATA),
31629    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
31630    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
31631    HOME_POSITION(HOME_POSITION_DATA),
31632    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
31633    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
31634    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
31635    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
31636    DEBUG(DEBUG_DATA),
31637    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
31638    COLLISION(COLLISION_DATA),
31639    ODOMETRY(ODOMETRY_DATA),
31640    LOG_DATA(LOG_DATA_DATA),
31641    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
31642    EVENT(EVENT_DATA),
31643    PING(PING_DATA),
31644    RAW_IMU(RAW_IMU_DATA),
31645}
31646impl MavMessage {
31647    pub const fn all_ids() -> &'static [u32] {
31648        &[
31649            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
31650            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
31651            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
31652            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
31653            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
31654            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
31655            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
31656            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
31657            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
31658            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
31659            148u32, 149u32, 162u32, 192u32, 225u32, 230u32, 231u32, 232u32, 233u32, 234u32, 235u32,
31660            241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32, 249u32, 250u32, 251u32,
31661            252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32, 261u32, 262u32, 263u32,
31662            264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32, 275u32, 276u32, 277u32,
31663            280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32, 288u32, 290u32, 291u32,
31664            299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32, 323u32, 324u32, 330u32,
31665            331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32, 350u32, 360u32, 370u32,
31666            371u32, 372u32, 373u32, 375u32, 380u32, 385u32, 386u32, 387u32, 388u32, 390u32, 395u32,
31667            396u32, 397u32, 400u32, 401u32, 410u32, 411u32, 412u32, 413u32, 435u32, 436u32, 437u32,
31668            440u32, 9000u32, 9005u32, 12900u32, 12901u32, 12902u32, 12903u32, 12904u32, 12905u32,
31669            12915u32, 12918u32, 12919u32, 12920u32, 60050u32, 60051u32, 60052u32, 60053u32,
31670        ]
31671    }
31672}
31673impl Message for MavMessage {
31674    fn parse(
31675        version: MavlinkVersion,
31676        id: u32,
31677        payload: &[u8],
31678    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31679        match id {
31680            COMMAND_INT_DATA::ID => {
31681                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
31682            }
31683            ATTITUDE_QUATERNION_DATA::ID => {
31684                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
31685            }
31686            RC_CHANNELS_OVERRIDE_DATA::ID => {
31687                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
31688            }
31689            CONTROL_SYSTEM_STATE_DATA::ID => {
31690                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
31691            }
31692            CHANGE_OPERATOR_CONTROL_DATA::ID => {
31693                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
31694                    .map(Self::CHANGE_OPERATOR_CONTROL)
31695            }
31696            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
31697            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
31698                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
31699                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
31700            }
31701            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
31702                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
31703                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
31704            }
31705            HIL_ACTUATOR_CONTROLS_DATA::ID => {
31706                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
31707            }
31708            COMPONENT_INFORMATION_DATA::ID => {
31709                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
31710            }
31711            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
31712                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
31713                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
31714            }
31715            PLAY_TUNE_V2_DATA::ID => {
31716                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
31717            }
31718            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
31719            VISION_POSITION_ESTIMATE_DATA::ID => {
31720                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
31721                    .map(Self::VISION_POSITION_ESTIMATE)
31722            }
31723            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
31724            COMMAND_CANCEL_DATA::ID => {
31725                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
31726            }
31727            RESPONSE_EVENT_ERROR_DATA::ID => {
31728                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
31729            }
31730            LOG_REQUEST_END_DATA::ID => {
31731                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
31732            }
31733            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
31734                .map(Self::OPEN_DRONE_ID_LOCATION),
31735            AVSS_DRONE_IMU_DATA::ID => {
31736                AVSS_DRONE_IMU_DATA::deser(version, payload).map(Self::AVSS_DRONE_IMU)
31737            }
31738            REQUEST_DATA_STREAM_DATA::ID => {
31739                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
31740            }
31741            SET_HOME_POSITION_DATA::ID => {
31742                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
31743            }
31744            SMART_BATTERY_INFO_DATA::ID => {
31745                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
31746            }
31747            ILLUMINATOR_STATUS_DATA::ID => {
31748                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
31749            }
31750            STORAGE_INFORMATION_DATA::ID => {
31751                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
31752            }
31753            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
31754                .map(Self::PARAM_EXT_REQUEST_READ),
31755            SCALED_IMU3_DATA::ID => {
31756                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
31757            }
31758            MESSAGE_INTERVAL_DATA::ID => {
31759                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
31760            }
31761            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
31762                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
31763                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
31764            }
31765            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
31766            PARAM_EXT_ACK_DATA::ID => {
31767                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
31768            }
31769            OBSTACLE_DISTANCE_DATA::ID => {
31770                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
31771            }
31772            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
31773            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
31774            POWER_STATUS_DATA::ID => {
31775                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
31776            }
31777            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
31778            MEMORY_VECT_DATA::ID => {
31779                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
31780            }
31781            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
31782            REQUEST_EVENT_DATA::ID => {
31783                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
31784            }
31785            PARAM_REQUEST_LIST_DATA::ID => {
31786                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
31787            }
31788            SCALED_PRESSURE2_DATA::ID => {
31789                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
31790            }
31791            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
31792                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
31793                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
31794            }
31795            PARAM_EXT_VALUE_DATA::ID => {
31796                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
31797            }
31798            COMPONENT_METADATA_DATA::ID => {
31799                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
31800            }
31801            TERRAIN_REPORT_DATA::ID => {
31802                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
31803            }
31804            BATTERY_STATUS_DATA::ID => {
31805                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
31806            }
31807            HIGH_LATENCY2_DATA::ID => {
31808                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
31809            }
31810            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
31811                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
31812                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
31813            }
31814            ATTITUDE_TARGET_DATA::ID => {
31815                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
31816            }
31817            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
31818            TERRAIN_DATA_DATA::ID => {
31819                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
31820            }
31821            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
31822                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
31823                    .map(Self::SAFETY_SET_ALLOWED_AREA)
31824            }
31825            COMPONENT_INFORMATION_BASIC_DATA::ID => {
31826                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
31827                    .map(Self::COMPONENT_INFORMATION_BASIC)
31828            }
31829            CANFD_FRAME_DATA::ID => {
31830                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
31831            }
31832            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
31833            MISSION_CURRENT_DATA::ID => {
31834                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
31835            }
31836            GIMBAL_MANAGER_STATUS_DATA::ID => {
31837                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
31838            }
31839            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
31840                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
31841                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
31842            }
31843            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
31844                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
31845                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
31846            }
31847            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
31848            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
31849                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
31850                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
31851            }
31852            UAVCAN_NODE_INFO_DATA::ID => {
31853                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
31854            }
31855            WHEEL_DISTANCE_DATA::ID => {
31856                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
31857            }
31858            FUEL_STATUS_DATA::ID => {
31859                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
31860            }
31861            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
31862                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
31863                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
31864            }
31865            HIGHRES_IMU_DATA::ID => {
31866                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
31867            }
31868            LOCAL_POSITION_NED_DATA::ID => {
31869                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
31870            }
31871            LINK_NODE_STATUS_DATA::ID => {
31872                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
31873            }
31874            NAMED_VALUE_FLOAT_DATA::ID => {
31875                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
31876            }
31877            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
31878            MISSION_ITEM_INT_DATA::ID => {
31879                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
31880            }
31881            LANDING_TARGET_DATA::ID => {
31882                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
31883            }
31884            ONBOARD_COMPUTER_STATUS_DATA::ID => {
31885                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
31886                    .map(Self::ONBOARD_COMPUTER_STATUS)
31887            }
31888            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
31889            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
31890            MISSION_COUNT_DATA::ID => {
31891                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
31892            }
31893            ACTUATOR_CONTROL_TARGET_DATA::ID => {
31894                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
31895                    .map(Self::ACTUATOR_CONTROL_TARGET)
31896            }
31897            PARAM_VALUE_DATA::ID => {
31898                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
31899            }
31900            VIDEO_STREAM_STATUS_DATA::ID => {
31901                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
31902            }
31903            AVSS_DRONE_POSITION_DATA::ID => {
31904                AVSS_DRONE_POSITION_DATA::deser(version, payload).map(Self::AVSS_DRONE_POSITION)
31905            }
31906            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
31907            CAN_FILTER_MODIFY_DATA::ID => {
31908                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
31909            }
31910            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
31911                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
31912                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
31913            }
31914            LOG_REQUEST_LIST_DATA::ID => {
31915                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
31916            }
31917            ATTITUDE_QUATERNION_COV_DATA::ID => {
31918                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
31919                    .map(Self::ATTITUDE_QUATERNION_COV)
31920            }
31921            GLOBAL_POSITION_INT_COV_DATA::ID => {
31922                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
31923                    .map(Self::GLOBAL_POSITION_INT_COV)
31924            }
31925            SETUP_SIGNING_DATA::ID => {
31926                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
31927            }
31928            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
31929                .map(Self::PARAM_EXT_REQUEST_LIST),
31930            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
31931            COMMAND_LONG_DATA::ID => {
31932                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
31933            }
31934            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
31935                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
31936            }
31937            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
31938            PARAM_MAP_RC_DATA::ID => {
31939                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
31940            }
31941            NAV_CONTROLLER_OUTPUT_DATA::ID => {
31942                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
31943            }
31944            ISBD_LINK_STATUS_DATA::ID => {
31945                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
31946            }
31947            GPS_INJECT_DATA_DATA::ID => {
31948                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
31949            }
31950            CAMERA_IMAGE_CAPTURED_DATA::ID => {
31951                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
31952            }
31953            POSITION_TARGET_LOCAL_NED_DATA::ID => {
31954                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
31955                    .map(Self::POSITION_TARGET_LOCAL_NED)
31956            }
31957            CAMERA_FOV_STATUS_DATA::ID => {
31958                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
31959            }
31960            MANUAL_SETPOINT_DATA::ID => {
31961                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
31962            }
31963            SYSTEM_TIME_DATA::ID => {
31964                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
31965            }
31966            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
31967                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
31968            }
31969            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
31970            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
31971                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
31972                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
31973            }
31974            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
31975            HIL_RC_INPUTS_RAW_DATA::ID => {
31976                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
31977            }
31978            V2_EXTENSION_DATA::ID => {
31979                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
31980            }
31981            ENCAPSULATED_DATA_DATA::ID => {
31982                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
31983            }
31984            DEBUG_FLOAT_ARRAY_DATA::ID => {
31985                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
31986            }
31987            ADSB_VEHICLE_DATA::ID => {
31988                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
31989            }
31990            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
31991            WIFI_CONFIG_AP_DATA::ID => {
31992                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
31993            }
31994            BATTERY_INFO_DATA::ID => {
31995                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
31996            }
31997            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
31998            GPS_RTCM_DATA_DATA::ID => {
31999                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
32000            }
32001            PROTOCOL_VERSION_DATA::ID => {
32002                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
32003            }
32004            FOLLOW_TARGET_DATA::ID => {
32005                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
32006            }
32007            TERRAIN_CHECK_DATA::ID => {
32008                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
32009            }
32010            RC_CHANNELS_RAW_DATA::ID => {
32011                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
32012            }
32013            CAMERA_CAPTURE_STATUS_DATA::ID => {
32014                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
32015            }
32016            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
32017                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
32018                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
32019            }
32020            HIGH_LATENCY_DATA::ID => {
32021                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
32022            }
32023            VISION_SPEED_ESTIMATE_DATA::ID => {
32024                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
32025            }
32026            LOGGING_ACK_DATA::ID => {
32027                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
32028            }
32029            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
32030                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
32031                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
32032            }
32033            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
32034            RC_CHANNELS_DATA::ID => {
32035                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
32036            }
32037            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
32038            VICON_POSITION_ESTIMATE_DATA::ID => {
32039                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
32040                    .map(Self::VICON_POSITION_ESTIMATE)
32041            }
32042            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
32043                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
32044            }
32045            LOGGING_DATA_DATA::ID => {
32046                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
32047            }
32048            LOG_REQUEST_DATA_DATA::ID => {
32049                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
32050            }
32051            SERIAL_CONTROL_DATA::ID => {
32052                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
32053            }
32054            AVSS_PRS_SYS_STATUS_DATA::ID => {
32055                AVSS_PRS_SYS_STATUS_DATA::deser(version, payload).map(Self::AVSS_PRS_SYS_STATUS)
32056            }
32057            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
32058            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
32059                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
32060                    .map(Self::GIMBAL_MANAGER_INFORMATION)
32061            }
32062            GPS_RAW_INT_DATA::ID => {
32063                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
32064            }
32065            GPS_GLOBAL_ORIGIN_DATA::ID => {
32066                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
32067            }
32068            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
32069                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
32070                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
32071            }
32072            MAG_CAL_REPORT_DATA::ID => {
32073                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
32074            }
32075            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
32076                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
32077                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
32078            }
32079            RAW_PRESSURE_DATA::ID => {
32080                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
32081            }
32082            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
32083            UTM_GLOBAL_POSITION_DATA::ID => {
32084                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
32085            }
32086            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
32087            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
32088                .map(Self::CURRENT_EVENT_SEQUENCE),
32089            CELLULAR_CONFIG_DATA::ID => {
32090                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
32091            }
32092            CELLULAR_STATUS_DATA::ID => {
32093                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
32094            }
32095            HIL_CONTROLS_DATA::ID => {
32096                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
32097            }
32098            SUPPORTED_TUNES_DATA::ID => {
32099                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
32100            }
32101            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
32102                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
32103                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
32104            }
32105            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
32106                .map(Self::ACTUATOR_OUTPUT_STATUS),
32107            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
32108                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
32109                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
32110            }
32111            ATT_POS_MOCAP_DATA::ID => {
32112                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
32113            }
32114            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
32115            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
32116                .map(Self::FILE_TRANSFER_PROTOCOL),
32117            MISSION_SET_CURRENT_DATA::ID => {
32118                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
32119            }
32120            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
32121                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
32122                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
32123            }
32124            SCALED_PRESSURE_DATA::ID => {
32125                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
32126            }
32127            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
32128                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
32129                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
32130            }
32131            AUTOPILOT_VERSION_DATA::ID => {
32132                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
32133            }
32134            HYGROMETER_SENSOR_DATA::ID => {
32135                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
32136            }
32137            AVAILABLE_MODES_MONITOR_DATA::ID => {
32138                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
32139                    .map(Self::AVAILABLE_MODES_MONITOR)
32140            }
32141            AVAILABLE_MODES_DATA::ID => {
32142                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
32143            }
32144            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
32145            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
32146            MISSION_REQUEST_INT_DATA::ID => {
32147                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
32148            }
32149            RESOURCE_REQUEST_DATA::ID => {
32150                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
32151            }
32152            RC_CHANNELS_SCALED_DATA::ID => {
32153                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
32154            }
32155            MISSION_ITEM_DATA::ID => {
32156                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
32157            }
32158            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
32159                .map(Self::OPEN_DRONE_ID_BASIC_ID),
32160            MISSION_ITEM_REACHED_DATA::ID => {
32161                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
32162            }
32163            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
32164            MISSION_CLEAR_ALL_DATA::ID => {
32165                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
32166            }
32167            PARAM_EXT_SET_DATA::ID => {
32168                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
32169            }
32170            SCALED_PRESSURE3_DATA::ID => {
32171                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
32172            }
32173            TERRAIN_REQUEST_DATA::ID => {
32174                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
32175            }
32176            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
32177                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
32178                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
32179            }
32180            SET_ATTITUDE_TARGET_DATA::ID => {
32181                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
32182            }
32183            OPTICAL_FLOW_RAD_DATA::ID => {
32184                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
32185            }
32186            MISSION_REQUEST_LIST_DATA::ID => {
32187                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
32188            }
32189            HIL_STATE_QUATERNION_DATA::ID => {
32190                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
32191            }
32192            COMMAND_ACK_DATA::ID => {
32193                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
32194            }
32195            BUTTON_CHANGE_DATA::ID => {
32196                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
32197            }
32198            GENERATOR_STATUS_DATA::ID => {
32199                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
32200            }
32201            MOUNT_ORIENTATION_DATA::ID => {
32202                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
32203            }
32204            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
32205                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
32206                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
32207            }
32208            SAFETY_ALLOWED_AREA_DATA::ID => {
32209                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
32210            }
32211            CAMERA_INFORMATION_DATA::ID => {
32212                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
32213            }
32214            GLOBAL_POSITION_INT_DATA::ID => {
32215                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
32216            }
32217            SCALED_IMU2_DATA::ID => {
32218                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
32219            }
32220            SERVO_OUTPUT_RAW_DATA::ID => {
32221                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
32222            }
32223            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
32224            LOGGING_DATA_ACKED_DATA::ID => {
32225                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
32226            }
32227            FENCE_STATUS_DATA::ID => {
32228                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
32229            }
32230            RADIO_STATUS_DATA::ID => {
32231                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
32232            }
32233            CURRENT_MODE_DATA::ID => {
32234                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
32235            }
32236            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
32237                .map(Self::ORBIT_EXECUTION_STATUS),
32238            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
32239            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
32240                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
32241                    .map(Self::TIME_ESTIMATE_TO_TARGET)
32242            }
32243            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
32244                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
32245                    .map(Self::POSITION_TARGET_GLOBAL_INT)
32246            }
32247            CAMERA_TRIGGER_DATA::ID => {
32248                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
32249            }
32250            ESTIMATOR_STATUS_DATA::ID => {
32251                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
32252            }
32253            OPTICAL_FLOW_DATA::ID => {
32254                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
32255            }
32256            MISSION_REQUEST_DATA::ID => {
32257                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
32258            }
32259            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
32260                .map(Self::LOCAL_POSITION_NED_COV),
32261            DISTANCE_SENSOR_DATA::ID => {
32262                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
32263            }
32264            UAVCAN_NODE_STATUS_DATA::ID => {
32265                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
32266            }
32267            MANUAL_CONTROL_DATA::ID => {
32268                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
32269            }
32270            WINCH_STATUS_DATA::ID => {
32271                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
32272            }
32273            MISSION_ACK_DATA::ID => {
32274                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
32275            }
32276            FLIGHT_INFORMATION_DATA::ID => {
32277                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
32278            }
32279            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
32280                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
32281                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
32282            }
32283            AVSS_DRONE_OPERATION_MODE_DATA::ID => {
32284                AVSS_DRONE_OPERATION_MODE_DATA::deser(version, payload)
32285                    .map(Self::AVSS_DRONE_OPERATION_MODE)
32286            }
32287            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
32288            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
32289                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
32290                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
32291            }
32292            DATA_STREAM_DATA::ID => {
32293                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
32294            }
32295            EXTENDED_SYS_STATE_DATA::ID => {
32296                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
32297            }
32298            PARAM_REQUEST_READ_DATA::ID => {
32299                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
32300            }
32301            HOME_POSITION_DATA::ID => {
32302                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
32303            }
32304            NAMED_VALUE_INT_DATA::ID => {
32305                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
32306            }
32307            CAMERA_THERMAL_RANGE_DATA::ID => {
32308                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
32309            }
32310            VIDEO_STREAM_INFORMATION_DATA::ID => {
32311                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
32312                    .map(Self::VIDEO_STREAM_INFORMATION)
32313            }
32314            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
32315                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
32316                    .map(Self::GIMBAL_DEVICE_INFORMATION)
32317            }
32318            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
32319            HIL_OPTICAL_FLOW_DATA::ID => {
32320                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
32321            }
32322            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
32323            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
32324            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
32325            CAMERA_SETTINGS_DATA::ID => {
32326                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
32327            }
32328            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
32329            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
32330            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
32331            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
32332        }
32333    }
32334    fn message_name(&self) -> &'static str {
32335        match self {
32336            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
32337            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
32338            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
32339            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
32340            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
32341            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
32342            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
32343            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
32344            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
32345            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
32346            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
32347            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
32348            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
32349            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
32350            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
32351            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
32352            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
32353            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
32354            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
32355            Self::AVSS_DRONE_IMU(..) => AVSS_DRONE_IMU_DATA::NAME,
32356            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
32357            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
32358            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
32359            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
32360            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
32361            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
32362            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
32363            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
32364            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
32365            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
32366            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
32367            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
32368            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
32369            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
32370            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
32371            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
32372            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
32373            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
32374            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
32375            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
32376            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
32377            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
32378                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
32379            }
32380            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
32381            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
32382            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
32383            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
32384            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
32385            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
32386            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
32387            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
32388            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
32389            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
32390            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
32391            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
32392            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
32393            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
32394            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
32395            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
32396            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
32397            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
32398            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
32399            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
32400            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
32401            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
32402            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
32403            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
32404            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
32405            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
32406            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
32407            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
32408            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
32409            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
32410            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
32411            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
32412            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
32413            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
32414            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
32415            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
32416            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
32417            Self::AVSS_DRONE_POSITION(..) => AVSS_DRONE_POSITION_DATA::NAME,
32418            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
32419            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
32420            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
32421            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
32422            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
32423            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
32424            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
32425            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
32426            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
32427            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
32428            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
32429            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
32430            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
32431            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
32432            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
32433            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
32434            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
32435            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
32436            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
32437            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
32438            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
32439            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
32440            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
32441            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
32442                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
32443            }
32444            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
32445            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
32446            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
32447            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
32448            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
32449            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
32450            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
32451            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
32452            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
32453            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
32454            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
32455            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
32456            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
32457            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
32458            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
32459            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
32460            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
32461            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
32462            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
32463            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
32464            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
32465            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
32466            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
32467            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
32468            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
32469            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
32470            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
32471            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
32472            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
32473            Self::AVSS_PRS_SYS_STATUS(..) => AVSS_PRS_SYS_STATUS_DATA::NAME,
32474            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
32475            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
32476            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
32477            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
32478            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
32479                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
32480            }
32481            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
32482            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
32483                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
32484            }
32485            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
32486            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
32487            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
32488            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
32489            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
32490            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
32491            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
32492            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
32493            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
32494            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
32495            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
32496            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
32497            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
32498            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
32499            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
32500            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
32501            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
32502            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
32503            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
32504            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
32505            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
32506            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
32507            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
32508            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
32509            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
32510            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
32511            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
32512            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
32513            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
32514            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
32515            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
32516            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
32517            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
32518            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
32519            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
32520            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
32521            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
32522                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
32523            }
32524            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
32525            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
32526            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
32527            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
32528            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
32529            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
32530            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
32531            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
32532            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
32533            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
32534            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
32535            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
32536            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
32537            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
32538            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
32539            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
32540            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
32541            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
32542            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
32543            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
32544            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
32545            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
32546            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
32547            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
32548            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
32549            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
32550            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
32551            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
32552            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
32553            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
32554            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
32555            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
32556            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
32557            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
32558            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
32559            Self::AVSS_DRONE_OPERATION_MODE(..) => AVSS_DRONE_OPERATION_MODE_DATA::NAME,
32560            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
32561            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
32562            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
32563            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
32564            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
32565            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
32566            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
32567            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
32568            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
32569            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
32570            Self::DEBUG(..) => DEBUG_DATA::NAME,
32571            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
32572            Self::COLLISION(..) => COLLISION_DATA::NAME,
32573            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
32574            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
32575            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
32576            Self::EVENT(..) => EVENT_DATA::NAME,
32577            Self::PING(..) => PING_DATA::NAME,
32578            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
32579        }
32580    }
32581    fn message_id(&self) -> u32 {
32582        match self {
32583            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
32584            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
32585            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
32586            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
32587            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
32588            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
32589            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
32590            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
32591            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
32592            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
32593            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
32594            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
32595            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
32596            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
32597            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
32598            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
32599            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
32600            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
32601            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
32602            Self::AVSS_DRONE_IMU(..) => AVSS_DRONE_IMU_DATA::ID,
32603            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
32604            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
32605            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
32606            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
32607            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
32608            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
32609            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
32610            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
32611            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
32612            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
32613            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
32614            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
32615            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
32616            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
32617            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
32618            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
32619            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
32620            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
32621            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
32622            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
32623            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
32624            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
32625                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
32626            }
32627            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
32628            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
32629            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
32630            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
32631            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
32632            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
32633            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
32634            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
32635            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
32636            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
32637            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
32638            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
32639            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
32640            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
32641            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
32642            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
32643            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
32644            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
32645            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
32646            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
32647            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
32648            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
32649            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
32650            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
32651            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
32652            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
32653            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
32654            Self::VIBRATION(..) => VIBRATION_DATA::ID,
32655            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
32656            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
32657            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
32658            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
32659            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
32660            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
32661            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
32662            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
32663            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
32664            Self::AVSS_DRONE_POSITION(..) => AVSS_DRONE_POSITION_DATA::ID,
32665            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
32666            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
32667            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
32668            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
32669            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
32670            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
32671            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
32672            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
32673            Self::TUNNEL(..) => TUNNEL_DATA::ID,
32674            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
32675            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
32676            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
32677            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
32678            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
32679            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
32680            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
32681            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
32682            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
32683            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
32684            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
32685            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
32686            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
32687            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
32688            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
32689                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
32690            }
32691            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
32692            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
32693            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
32694            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
32695            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
32696            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
32697            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
32698            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
32699            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
32700            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
32701            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
32702            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
32703            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
32704            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
32705            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
32706            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
32707            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
32708            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
32709            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
32710            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
32711            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
32712            Self::SET_MODE(..) => SET_MODE_DATA::ID,
32713            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
32714            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
32715            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
32716            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
32717            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
32718            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
32719            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
32720            Self::AVSS_PRS_SYS_STATUS(..) => AVSS_PRS_SYS_STATUS_DATA::ID,
32721            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
32722            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
32723            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
32724            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
32725            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
32726            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
32727            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
32728                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
32729            }
32730            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
32731            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
32732            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
32733            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
32734            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
32735            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
32736            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
32737            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
32738            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
32739            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
32740            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
32741            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
32742            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
32743            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
32744            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
32745            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
32746            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
32747            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
32748            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
32749            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
32750            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
32751            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
32752            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
32753            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
32754            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
32755            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
32756            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
32757            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
32758            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
32759            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
32760            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
32761            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
32762            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
32763            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
32764            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
32765            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
32766            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
32767                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
32768            }
32769            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
32770            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
32771            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
32772            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
32773            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
32774            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
32775            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
32776            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
32777            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
32778            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
32779            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
32780            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
32781            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
32782            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
32783            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
32784            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
32785            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
32786            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
32787            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
32788            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
32789            Self::WIND_COV(..) => WIND_COV_DATA::ID,
32790            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
32791            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
32792            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
32793            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
32794            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
32795            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
32796            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
32797            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
32798            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
32799            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
32800            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
32801            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
32802            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
32803            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
32804            Self::AVSS_DRONE_OPERATION_MODE(..) => AVSS_DRONE_OPERATION_MODE_DATA::ID,
32805            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
32806            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
32807            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
32808            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
32809            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
32810            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
32811            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
32812            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
32813            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
32814            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
32815            Self::DEBUG(..) => DEBUG_DATA::ID,
32816            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
32817            Self::COLLISION(..) => COLLISION_DATA::ID,
32818            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
32819            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
32820            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
32821            Self::EVENT(..) => EVENT_DATA::ID,
32822            Self::PING(..) => PING_DATA::ID,
32823            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
32824        }
32825    }
32826    fn message_id_from_name(name: &str) -> Option<u32> {
32827        match name {
32828            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
32829            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
32830            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
32831            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
32832            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
32833            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
32834            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
32835            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
32836            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
32837            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
32838            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
32839                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
32840            }
32841            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
32842            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
32843            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
32844            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
32845            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
32846            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
32847            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
32848            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
32849            AVSS_DRONE_IMU_DATA::NAME => Some(AVSS_DRONE_IMU_DATA::ID),
32850            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
32851            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
32852            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
32853            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
32854            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
32855            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
32856            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
32857            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
32858            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
32859            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
32860            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
32861            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
32862            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
32863            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
32864            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
32865            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
32866            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
32867            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
32868            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
32869            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
32870            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
32871            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
32872                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
32873            }
32874            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
32875            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
32876            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
32877            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
32878            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
32879            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
32880                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
32881            }
32882            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
32883            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
32884            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
32885            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
32886            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
32887            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
32888            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
32889            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
32890            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
32891            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
32892            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
32893            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
32894            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
32895            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
32896            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
32897            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
32898            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
32899            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
32900            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
32901            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
32902            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
32903            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
32904            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
32905            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
32906            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
32907            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
32908            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
32909            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
32910            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
32911            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
32912            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
32913            AVSS_DRONE_POSITION_DATA::NAME => Some(AVSS_DRONE_POSITION_DATA::ID),
32914            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
32915            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
32916            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
32917            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
32918            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
32919            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
32920            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
32921            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
32922            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
32923            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
32924            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
32925            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
32926            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
32927            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
32928            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
32929            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
32930            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
32931            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
32932            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
32933            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
32934            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
32935            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
32936            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
32937            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
32938                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
32939            }
32940            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
32941            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
32942            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
32943            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
32944            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
32945            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
32946            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
32947            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
32948            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
32949            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
32950            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
32951            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
32952            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
32953            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
32954            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
32955            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
32956            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
32957            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
32958            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
32959            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
32960            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
32961            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
32962            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
32963            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
32964            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
32965            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
32966            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
32967            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
32968            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
32969            AVSS_PRS_SYS_STATUS_DATA::NAME => Some(AVSS_PRS_SYS_STATUS_DATA::ID),
32970            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
32971            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
32972            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
32973            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
32974            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
32975                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
32976            }
32977            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
32978            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
32979                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
32980            }
32981            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
32982            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
32983            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
32984            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
32985            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
32986            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
32987            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
32988            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
32989            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
32990            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
32991            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
32992            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
32993            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
32994            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
32995            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
32996            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
32997            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
32998            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
32999            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
33000                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
33001            }
33002            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
33003            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
33004            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
33005            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
33006            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
33007            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
33008            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
33009            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
33010            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
33011            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
33012            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
33013            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
33014            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
33015            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
33016            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
33017            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
33018            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
33019            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
33020                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
33021            }
33022            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
33023            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
33024            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
33025            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
33026            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
33027            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
33028            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
33029            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
33030            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
33031            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
33032            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
33033            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
33034            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
33035            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
33036            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
33037            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
33038            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
33039            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
33040            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
33041            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
33042            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
33043            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
33044            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
33045            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
33046            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
33047            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
33048            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
33049            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
33050            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
33051            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
33052            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
33053            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
33054            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
33055            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
33056            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
33057            AVSS_DRONE_OPERATION_MODE_DATA::NAME => Some(AVSS_DRONE_OPERATION_MODE_DATA::ID),
33058            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
33059            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
33060                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
33061            }
33062            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
33063            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
33064            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
33065            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
33066            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
33067            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
33068            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
33069            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
33070            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
33071            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
33072            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
33073            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
33074            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
33075            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
33076            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
33077            PING_DATA::NAME => Some(PING_DATA::ID),
33078            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
33079            _ => None,
33080        }
33081    }
33082    fn default_message_from_id(id: u32) -> Option<Self> {
33083        match id {
33084            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
33085            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
33086                ATTITUDE_QUATERNION_DATA::default(),
33087            )),
33088            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
33089                RC_CHANNELS_OVERRIDE_DATA::default(),
33090            )),
33091            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
33092                CONTROL_SYSTEM_STATE_DATA::default(),
33093            )),
33094            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
33095                CHANGE_OPERATOR_CONTROL_DATA::default(),
33096            )),
33097            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
33098            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
33099                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
33100            )),
33101            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
33102                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
33103            )),
33104            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
33105                HIL_ACTUATOR_CONTROLS_DATA::default(),
33106            )),
33107            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
33108                COMPONENT_INFORMATION_DATA::default(),
33109            )),
33110            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
33111                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
33112            )),
33113            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
33114            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
33115            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
33116                VISION_POSITION_ESTIMATE_DATA::default(),
33117            )),
33118            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
33119            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
33120            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
33121                RESPONSE_EVENT_ERROR_DATA::default(),
33122            )),
33123            LOG_REQUEST_END_DATA::ID => {
33124                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
33125            }
33126            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
33127                OPEN_DRONE_ID_LOCATION_DATA::default(),
33128            )),
33129            AVSS_DRONE_IMU_DATA::ID => Some(Self::AVSS_DRONE_IMU(AVSS_DRONE_IMU_DATA::default())),
33130            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
33131                REQUEST_DATA_STREAM_DATA::default(),
33132            )),
33133            SET_HOME_POSITION_DATA::ID => {
33134                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
33135            }
33136            SMART_BATTERY_INFO_DATA::ID => {
33137                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
33138            }
33139            ILLUMINATOR_STATUS_DATA::ID => {
33140                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
33141            }
33142            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
33143                STORAGE_INFORMATION_DATA::default(),
33144            )),
33145            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
33146                PARAM_EXT_REQUEST_READ_DATA::default(),
33147            )),
33148            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
33149            MESSAGE_INTERVAL_DATA::ID => {
33150                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
33151            }
33152            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
33153                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
33154            )),
33155            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
33156            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
33157            OBSTACLE_DISTANCE_DATA::ID => {
33158                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
33159            }
33160            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
33161            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
33162            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
33163            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
33164            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
33165            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
33166            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
33167            PARAM_REQUEST_LIST_DATA::ID => {
33168                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
33169            }
33170            SCALED_PRESSURE2_DATA::ID => {
33171                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
33172            }
33173            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
33174                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
33175                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
33176                ))
33177            }
33178            PARAM_EXT_VALUE_DATA::ID => {
33179                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
33180            }
33181            COMPONENT_METADATA_DATA::ID => {
33182                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
33183            }
33184            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
33185            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
33186            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
33187            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
33188                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
33189            )),
33190            ATTITUDE_TARGET_DATA::ID => {
33191                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
33192            }
33193            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
33194            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
33195            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
33196                SAFETY_SET_ALLOWED_AREA_DATA::default(),
33197            )),
33198            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
33199                COMPONENT_INFORMATION_BASIC_DATA::default(),
33200            )),
33201            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
33202            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
33203            MISSION_CURRENT_DATA::ID => {
33204                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
33205            }
33206            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
33207                GIMBAL_MANAGER_STATUS_DATA::default(),
33208            )),
33209            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
33210                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
33211            )),
33212            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
33213                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
33214            )),
33215            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
33216            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
33217                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
33218            )),
33219            UAVCAN_NODE_INFO_DATA::ID => {
33220                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
33221            }
33222            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
33223            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
33224            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
33225                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
33226            )),
33227            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
33228            LOCAL_POSITION_NED_DATA::ID => {
33229                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
33230            }
33231            LINK_NODE_STATUS_DATA::ID => {
33232                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
33233            }
33234            NAMED_VALUE_FLOAT_DATA::ID => {
33235                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
33236            }
33237            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
33238            MISSION_ITEM_INT_DATA::ID => {
33239                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
33240            }
33241            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
33242            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
33243                ONBOARD_COMPUTER_STATUS_DATA::default(),
33244            )),
33245            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
33246            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
33247            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
33248            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
33249                ACTUATOR_CONTROL_TARGET_DATA::default(),
33250            )),
33251            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
33252            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
33253                VIDEO_STREAM_STATUS_DATA::default(),
33254            )),
33255            AVSS_DRONE_POSITION_DATA::ID => Some(Self::AVSS_DRONE_POSITION(
33256                AVSS_DRONE_POSITION_DATA::default(),
33257            )),
33258            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
33259            CAN_FILTER_MODIFY_DATA::ID => {
33260                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
33261            }
33262            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
33263                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
33264            )),
33265            LOG_REQUEST_LIST_DATA::ID => {
33266                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
33267            }
33268            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
33269                ATTITUDE_QUATERNION_COV_DATA::default(),
33270            )),
33271            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
33272                GLOBAL_POSITION_INT_COV_DATA::default(),
33273            )),
33274            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
33275            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
33276                PARAM_EXT_REQUEST_LIST_DATA::default(),
33277            )),
33278            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
33279            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
33280            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
33281                OPEN_DRONE_ID_SELF_ID_DATA::default(),
33282            )),
33283            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
33284            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
33285            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
33286                NAV_CONTROLLER_OUTPUT_DATA::default(),
33287            )),
33288            ISBD_LINK_STATUS_DATA::ID => {
33289                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
33290            }
33291            GPS_INJECT_DATA_DATA::ID => {
33292                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
33293            }
33294            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
33295                CAMERA_IMAGE_CAPTURED_DATA::default(),
33296            )),
33297            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
33298                POSITION_TARGET_LOCAL_NED_DATA::default(),
33299            )),
33300            CAMERA_FOV_STATUS_DATA::ID => {
33301                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
33302            }
33303            MANUAL_SETPOINT_DATA::ID => {
33304                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
33305            }
33306            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
33307            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
33308                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
33309            )),
33310            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
33311            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
33312                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
33313                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
33314                ))
33315            }
33316            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
33317            HIL_RC_INPUTS_RAW_DATA::ID => {
33318                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
33319            }
33320            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
33321            ENCAPSULATED_DATA_DATA::ID => {
33322                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
33323            }
33324            DEBUG_FLOAT_ARRAY_DATA::ID => {
33325                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
33326            }
33327            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
33328            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
33329            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
33330            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
33331            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
33332            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
33333            PROTOCOL_VERSION_DATA::ID => {
33334                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
33335            }
33336            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
33337            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
33338            RC_CHANNELS_RAW_DATA::ID => {
33339                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
33340            }
33341            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
33342                CAMERA_CAPTURE_STATUS_DATA::default(),
33343            )),
33344            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
33345                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
33346            )),
33347            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
33348            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
33349                VISION_SPEED_ESTIMATE_DATA::default(),
33350            )),
33351            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
33352            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
33353                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
33354            )),
33355            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
33356            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
33357            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
33358            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
33359                VICON_POSITION_ESTIMATE_DATA::default(),
33360            )),
33361            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
33362                OPEN_DRONE_ID_SYSTEM_DATA::default(),
33363            )),
33364            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
33365            LOG_REQUEST_DATA_DATA::ID => {
33366                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
33367            }
33368            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
33369            AVSS_PRS_SYS_STATUS_DATA::ID => Some(Self::AVSS_PRS_SYS_STATUS(
33370                AVSS_PRS_SYS_STATUS_DATA::default(),
33371            )),
33372            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
33373            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
33374                GIMBAL_MANAGER_INFORMATION_DATA::default(),
33375            )),
33376            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
33377            GPS_GLOBAL_ORIGIN_DATA::ID => {
33378                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
33379            }
33380            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
33381                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
33382                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
33383                ))
33384            }
33385            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
33386            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
33387                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
33388                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
33389                ))
33390            }
33391            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
33392            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
33393            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
33394                UTM_GLOBAL_POSITION_DATA::default(),
33395            )),
33396            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
33397            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
33398                CURRENT_EVENT_SEQUENCE_DATA::default(),
33399            )),
33400            CELLULAR_CONFIG_DATA::ID => {
33401                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
33402            }
33403            CELLULAR_STATUS_DATA::ID => {
33404                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
33405            }
33406            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
33407            SUPPORTED_TUNES_DATA::ID => {
33408                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
33409            }
33410            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
33411                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
33412            )),
33413            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
33414                ACTUATOR_OUTPUT_STATUS_DATA::default(),
33415            )),
33416            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
33417                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
33418            )),
33419            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
33420            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
33421            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
33422                FILE_TRANSFER_PROTOCOL_DATA::default(),
33423            )),
33424            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
33425                MISSION_SET_CURRENT_DATA::default(),
33426            )),
33427            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
33428                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
33429            )),
33430            SCALED_PRESSURE_DATA::ID => {
33431                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
33432            }
33433            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
33434                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
33435                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
33436                ))
33437            }
33438            AUTOPILOT_VERSION_DATA::ID => {
33439                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
33440            }
33441            HYGROMETER_SENSOR_DATA::ID => {
33442                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
33443            }
33444            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
33445                AVAILABLE_MODES_MONITOR_DATA::default(),
33446            )),
33447            AVAILABLE_MODES_DATA::ID => {
33448                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
33449            }
33450            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
33451            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
33452            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
33453                MISSION_REQUEST_INT_DATA::default(),
33454            )),
33455            RESOURCE_REQUEST_DATA::ID => {
33456                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
33457            }
33458            RC_CHANNELS_SCALED_DATA::ID => {
33459                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
33460            }
33461            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
33462            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
33463                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
33464            )),
33465            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
33466                MISSION_ITEM_REACHED_DATA::default(),
33467            )),
33468            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
33469            MISSION_CLEAR_ALL_DATA::ID => {
33470                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
33471            }
33472            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
33473            SCALED_PRESSURE3_DATA::ID => {
33474                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
33475            }
33476            TERRAIN_REQUEST_DATA::ID => {
33477                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
33478            }
33479            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
33480                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
33481                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
33482                ))
33483            }
33484            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
33485                SET_ATTITUDE_TARGET_DATA::default(),
33486            )),
33487            OPTICAL_FLOW_RAD_DATA::ID => {
33488                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
33489            }
33490            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
33491                MISSION_REQUEST_LIST_DATA::default(),
33492            )),
33493            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
33494                HIL_STATE_QUATERNION_DATA::default(),
33495            )),
33496            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
33497            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
33498            GENERATOR_STATUS_DATA::ID => {
33499                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
33500            }
33501            MOUNT_ORIENTATION_DATA::ID => {
33502                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
33503            }
33504            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
33505                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
33506            )),
33507            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
33508                SAFETY_ALLOWED_AREA_DATA::default(),
33509            )),
33510            CAMERA_INFORMATION_DATA::ID => {
33511                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
33512            }
33513            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
33514                GLOBAL_POSITION_INT_DATA::default(),
33515            )),
33516            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
33517            SERVO_OUTPUT_RAW_DATA::ID => {
33518                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
33519            }
33520            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
33521            LOGGING_DATA_ACKED_DATA::ID => {
33522                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
33523            }
33524            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
33525            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
33526            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
33527            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
33528                ORBIT_EXECUTION_STATUS_DATA::default(),
33529            )),
33530            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
33531            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
33532                TIME_ESTIMATE_TO_TARGET_DATA::default(),
33533            )),
33534            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
33535                POSITION_TARGET_GLOBAL_INT_DATA::default(),
33536            )),
33537            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
33538            ESTIMATOR_STATUS_DATA::ID => {
33539                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
33540            }
33541            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
33542            MISSION_REQUEST_DATA::ID => {
33543                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
33544            }
33545            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
33546                LOCAL_POSITION_NED_COV_DATA::default(),
33547            )),
33548            DISTANCE_SENSOR_DATA::ID => {
33549                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
33550            }
33551            UAVCAN_NODE_STATUS_DATA::ID => {
33552                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
33553            }
33554            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
33555            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
33556            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
33557            FLIGHT_INFORMATION_DATA::ID => {
33558                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
33559            }
33560            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
33561                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
33562            )),
33563            AVSS_DRONE_OPERATION_MODE_DATA::ID => Some(Self::AVSS_DRONE_OPERATION_MODE(
33564                AVSS_DRONE_OPERATION_MODE_DATA::default(),
33565            )),
33566            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
33567            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
33568                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
33569            )),
33570            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
33571            EXTENDED_SYS_STATE_DATA::ID => {
33572                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
33573            }
33574            PARAM_REQUEST_READ_DATA::ID => {
33575                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
33576            }
33577            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
33578            NAMED_VALUE_INT_DATA::ID => {
33579                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
33580            }
33581            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
33582                CAMERA_THERMAL_RANGE_DATA::default(),
33583            )),
33584            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
33585                VIDEO_STREAM_INFORMATION_DATA::default(),
33586            )),
33587            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
33588                GIMBAL_DEVICE_INFORMATION_DATA::default(),
33589            )),
33590            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
33591            HIL_OPTICAL_FLOW_DATA::ID => {
33592                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
33593            }
33594            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
33595            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
33596            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
33597            CAMERA_SETTINGS_DATA::ID => {
33598                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
33599            }
33600            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
33601            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
33602            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
33603            _ => None,
33604        }
33605    }
33606    #[cfg(feature = "arbitrary")]
33607    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
33608        match id {
33609            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
33610            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
33611                ATTITUDE_QUATERNION_DATA::random(rng),
33612            )),
33613            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
33614                RC_CHANNELS_OVERRIDE_DATA::random(rng),
33615            )),
33616            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
33617                CONTROL_SYSTEM_STATE_DATA::random(rng),
33618            )),
33619            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
33620                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
33621            )),
33622            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
33623            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
33624                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
33625            )),
33626            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
33627                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
33628            )),
33629            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
33630                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
33631            )),
33632            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
33633                COMPONENT_INFORMATION_DATA::random(rng),
33634            )),
33635            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
33636                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
33637            )),
33638            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
33639            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
33640            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
33641                VISION_POSITION_ESTIMATE_DATA::random(rng),
33642            )),
33643            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
33644            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
33645            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
33646                RESPONSE_EVENT_ERROR_DATA::random(rng),
33647            )),
33648            LOG_REQUEST_END_DATA::ID => {
33649                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
33650            }
33651            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
33652                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
33653            )),
33654            AVSS_DRONE_IMU_DATA::ID => Some(Self::AVSS_DRONE_IMU(AVSS_DRONE_IMU_DATA::random(rng))),
33655            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
33656                REQUEST_DATA_STREAM_DATA::random(rng),
33657            )),
33658            SET_HOME_POSITION_DATA::ID => {
33659                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
33660            }
33661            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
33662                SMART_BATTERY_INFO_DATA::random(rng),
33663            )),
33664            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
33665                ILLUMINATOR_STATUS_DATA::random(rng),
33666            )),
33667            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
33668                STORAGE_INFORMATION_DATA::random(rng),
33669            )),
33670            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
33671                PARAM_EXT_REQUEST_READ_DATA::random(rng),
33672            )),
33673            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
33674            MESSAGE_INTERVAL_DATA::ID => {
33675                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
33676            }
33677            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
33678                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
33679            )),
33680            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
33681            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
33682            OBSTACLE_DISTANCE_DATA::ID => {
33683                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
33684            }
33685            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
33686            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
33687            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
33688            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
33689            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
33690            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
33691            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
33692            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
33693                PARAM_REQUEST_LIST_DATA::random(rng),
33694            )),
33695            SCALED_PRESSURE2_DATA::ID => {
33696                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
33697            }
33698            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
33699                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
33700                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
33701                ))
33702            }
33703            PARAM_EXT_VALUE_DATA::ID => {
33704                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
33705            }
33706            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
33707                COMPONENT_METADATA_DATA::random(rng),
33708            )),
33709            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
33710            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
33711            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
33712            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
33713                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
33714            )),
33715            ATTITUDE_TARGET_DATA::ID => {
33716                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
33717            }
33718            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
33719            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
33720            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
33721                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
33722            )),
33723            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
33724                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
33725            )),
33726            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
33727            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
33728            MISSION_CURRENT_DATA::ID => {
33729                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
33730            }
33731            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
33732                GIMBAL_MANAGER_STATUS_DATA::random(rng),
33733            )),
33734            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
33735                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
33736            )),
33737            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
33738                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
33739            )),
33740            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
33741            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
33742                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
33743            )),
33744            UAVCAN_NODE_INFO_DATA::ID => {
33745                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
33746            }
33747            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
33748            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
33749            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
33750                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
33751            )),
33752            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
33753            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
33754                LOCAL_POSITION_NED_DATA::random(rng),
33755            )),
33756            LINK_NODE_STATUS_DATA::ID => {
33757                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
33758            }
33759            NAMED_VALUE_FLOAT_DATA::ID => {
33760                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
33761            }
33762            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
33763            MISSION_ITEM_INT_DATA::ID => {
33764                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
33765            }
33766            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
33767            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
33768                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
33769            )),
33770            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
33771            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
33772            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
33773            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
33774                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
33775            )),
33776            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
33777            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
33778                VIDEO_STREAM_STATUS_DATA::random(rng),
33779            )),
33780            AVSS_DRONE_POSITION_DATA::ID => Some(Self::AVSS_DRONE_POSITION(
33781                AVSS_DRONE_POSITION_DATA::random(rng),
33782            )),
33783            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
33784            CAN_FILTER_MODIFY_DATA::ID => {
33785                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
33786            }
33787            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
33788                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
33789            )),
33790            LOG_REQUEST_LIST_DATA::ID => {
33791                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
33792            }
33793            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
33794                ATTITUDE_QUATERNION_COV_DATA::random(rng),
33795            )),
33796            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
33797                GLOBAL_POSITION_INT_COV_DATA::random(rng),
33798            )),
33799            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
33800            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
33801                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
33802            )),
33803            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
33804            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
33805            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
33806                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
33807            )),
33808            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
33809            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
33810            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
33811                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
33812            )),
33813            ISBD_LINK_STATUS_DATA::ID => {
33814                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
33815            }
33816            GPS_INJECT_DATA_DATA::ID => {
33817                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
33818            }
33819            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
33820                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
33821            )),
33822            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
33823                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
33824            )),
33825            CAMERA_FOV_STATUS_DATA::ID => {
33826                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
33827            }
33828            MANUAL_SETPOINT_DATA::ID => {
33829                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
33830            }
33831            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
33832            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
33833                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
33834            )),
33835            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
33836            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
33837                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
33838                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
33839                ))
33840            }
33841            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
33842            HIL_RC_INPUTS_RAW_DATA::ID => {
33843                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
33844            }
33845            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
33846            ENCAPSULATED_DATA_DATA::ID => {
33847                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
33848            }
33849            DEBUG_FLOAT_ARRAY_DATA::ID => {
33850                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
33851            }
33852            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
33853            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
33854            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
33855            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
33856            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
33857            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
33858            PROTOCOL_VERSION_DATA::ID => {
33859                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
33860            }
33861            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
33862            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
33863            RC_CHANNELS_RAW_DATA::ID => {
33864                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
33865            }
33866            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
33867                CAMERA_CAPTURE_STATUS_DATA::random(rng),
33868            )),
33869            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
33870                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
33871            )),
33872            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
33873            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
33874                VISION_SPEED_ESTIMATE_DATA::random(rng),
33875            )),
33876            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
33877            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
33878                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
33879            )),
33880            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
33881            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
33882            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
33883            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
33884                VICON_POSITION_ESTIMATE_DATA::random(rng),
33885            )),
33886            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
33887                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
33888            )),
33889            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
33890            LOG_REQUEST_DATA_DATA::ID => {
33891                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
33892            }
33893            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
33894            AVSS_PRS_SYS_STATUS_DATA::ID => Some(Self::AVSS_PRS_SYS_STATUS(
33895                AVSS_PRS_SYS_STATUS_DATA::random(rng),
33896            )),
33897            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
33898            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
33899                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
33900            )),
33901            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
33902            GPS_GLOBAL_ORIGIN_DATA::ID => {
33903                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
33904            }
33905            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
33906                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
33907                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
33908                ))
33909            }
33910            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
33911            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
33912                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
33913                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
33914                ))
33915            }
33916            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
33917            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
33918            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
33919                UTM_GLOBAL_POSITION_DATA::random(rng),
33920            )),
33921            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
33922            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
33923                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
33924            )),
33925            CELLULAR_CONFIG_DATA::ID => {
33926                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
33927            }
33928            CELLULAR_STATUS_DATA::ID => {
33929                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
33930            }
33931            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
33932            SUPPORTED_TUNES_DATA::ID => {
33933                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
33934            }
33935            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
33936                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
33937            )),
33938            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
33939                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
33940            )),
33941            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
33942                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
33943            )),
33944            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
33945            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
33946            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
33947                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
33948            )),
33949            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
33950                MISSION_SET_CURRENT_DATA::random(rng),
33951            )),
33952            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
33953                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
33954            )),
33955            SCALED_PRESSURE_DATA::ID => {
33956                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
33957            }
33958            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
33959                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
33960                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
33961                ))
33962            }
33963            AUTOPILOT_VERSION_DATA::ID => {
33964                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
33965            }
33966            HYGROMETER_SENSOR_DATA::ID => {
33967                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
33968            }
33969            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
33970                AVAILABLE_MODES_MONITOR_DATA::random(rng),
33971            )),
33972            AVAILABLE_MODES_DATA::ID => {
33973                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
33974            }
33975            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
33976            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
33977            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
33978                MISSION_REQUEST_INT_DATA::random(rng),
33979            )),
33980            RESOURCE_REQUEST_DATA::ID => {
33981                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
33982            }
33983            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
33984                RC_CHANNELS_SCALED_DATA::random(rng),
33985            )),
33986            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
33987            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
33988                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
33989            )),
33990            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
33991                MISSION_ITEM_REACHED_DATA::random(rng),
33992            )),
33993            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
33994            MISSION_CLEAR_ALL_DATA::ID => {
33995                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
33996            }
33997            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
33998            SCALED_PRESSURE3_DATA::ID => {
33999                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
34000            }
34001            TERRAIN_REQUEST_DATA::ID => {
34002                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
34003            }
34004            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
34005                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
34006                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
34007                ))
34008            }
34009            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
34010                SET_ATTITUDE_TARGET_DATA::random(rng),
34011            )),
34012            OPTICAL_FLOW_RAD_DATA::ID => {
34013                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
34014            }
34015            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
34016                MISSION_REQUEST_LIST_DATA::random(rng),
34017            )),
34018            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
34019                HIL_STATE_QUATERNION_DATA::random(rng),
34020            )),
34021            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
34022            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
34023            GENERATOR_STATUS_DATA::ID => {
34024                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
34025            }
34026            MOUNT_ORIENTATION_DATA::ID => {
34027                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
34028            }
34029            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
34030                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
34031            )),
34032            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
34033                SAFETY_ALLOWED_AREA_DATA::random(rng),
34034            )),
34035            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
34036                CAMERA_INFORMATION_DATA::random(rng),
34037            )),
34038            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
34039                GLOBAL_POSITION_INT_DATA::random(rng),
34040            )),
34041            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
34042            SERVO_OUTPUT_RAW_DATA::ID => {
34043                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
34044            }
34045            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
34046            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
34047                LOGGING_DATA_ACKED_DATA::random(rng),
34048            )),
34049            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
34050            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
34051            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
34052            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
34053                ORBIT_EXECUTION_STATUS_DATA::random(rng),
34054            )),
34055            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
34056            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
34057                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
34058            )),
34059            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
34060                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
34061            )),
34062            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
34063            ESTIMATOR_STATUS_DATA::ID => {
34064                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
34065            }
34066            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
34067            MISSION_REQUEST_DATA::ID => {
34068                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
34069            }
34070            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
34071                LOCAL_POSITION_NED_COV_DATA::random(rng),
34072            )),
34073            DISTANCE_SENSOR_DATA::ID => {
34074                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
34075            }
34076            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
34077                UAVCAN_NODE_STATUS_DATA::random(rng),
34078            )),
34079            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
34080            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
34081            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
34082            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
34083                FLIGHT_INFORMATION_DATA::random(rng),
34084            )),
34085            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
34086                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
34087            )),
34088            AVSS_DRONE_OPERATION_MODE_DATA::ID => Some(Self::AVSS_DRONE_OPERATION_MODE(
34089                AVSS_DRONE_OPERATION_MODE_DATA::random(rng),
34090            )),
34091            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
34092            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
34093                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
34094            )),
34095            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
34096            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
34097                EXTENDED_SYS_STATE_DATA::random(rng),
34098            )),
34099            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
34100                PARAM_REQUEST_READ_DATA::random(rng),
34101            )),
34102            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
34103            NAMED_VALUE_INT_DATA::ID => {
34104                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
34105            }
34106            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
34107                CAMERA_THERMAL_RANGE_DATA::random(rng),
34108            )),
34109            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
34110                VIDEO_STREAM_INFORMATION_DATA::random(rng),
34111            )),
34112            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
34113                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
34114            )),
34115            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
34116            HIL_OPTICAL_FLOW_DATA::ID => {
34117                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
34118            }
34119            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
34120            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
34121            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
34122            CAMERA_SETTINGS_DATA::ID => {
34123                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
34124            }
34125            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
34126            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
34127            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
34128            _ => None,
34129        }
34130    }
34131    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34132        match self {
34133            Self::COMMAND_INT(body) => body.ser(version, bytes),
34134            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
34135            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
34136            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
34137            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
34138            Self::AIS_VESSEL(body) => body.ser(version, bytes),
34139            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
34140            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
34141            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
34142            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
34143            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
34144            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
34145            Self::SYS_STATUS(body) => body.ser(version, bytes),
34146            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
34147            Self::AUTH_KEY(body) => body.ser(version, bytes),
34148            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
34149            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
34150            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
34151            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
34152            Self::AVSS_DRONE_IMU(body) => body.ser(version, bytes),
34153            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
34154            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
34155            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
34156            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
34157            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
34158            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
34159            Self::SCALED_IMU3(body) => body.ser(version, bytes),
34160            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
34161            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
34162            Self::GPS_INPUT(body) => body.ser(version, bytes),
34163            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
34164            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
34165            Self::RAW_RPM(body) => body.ser(version, bytes),
34166            Self::HIL_GPS(body) => body.ser(version, bytes),
34167            Self::POWER_STATUS(body) => body.ser(version, bytes),
34168            Self::EFI_STATUS(body) => body.ser(version, bytes),
34169            Self::MEMORY_VECT(body) => body.ser(version, bytes),
34170            Self::LOG_ENTRY(body) => body.ser(version, bytes),
34171            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
34172            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
34173            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
34174            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
34175            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
34176            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
34177            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
34178            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
34179            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
34180            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
34181            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
34182            Self::ATTITUDE(body) => body.ser(version, bytes),
34183            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
34184            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
34185            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
34186            Self::CANFD_FRAME(body) => body.ser(version, bytes),
34187            Self::HIL_STATE(body) => body.ser(version, bytes),
34188            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
34189            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
34190            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
34191            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
34192            Self::HIL_SENSOR(body) => body.ser(version, bytes),
34193            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
34194            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
34195            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
34196            Self::FUEL_STATUS(body) => body.ser(version, bytes),
34197            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
34198            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
34199            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
34200            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
34201            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
34202            Self::VIBRATION(body) => body.ser(version, bytes),
34203            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
34204            Self::LANDING_TARGET(body) => body.ser(version, bytes),
34205            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
34206            Self::PLAY_TUNE(body) => body.ser(version, bytes),
34207            Self::GPS_STATUS(body) => body.ser(version, bytes),
34208            Self::MISSION_COUNT(body) => body.ser(version, bytes),
34209            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
34210            Self::PARAM_VALUE(body) => body.ser(version, bytes),
34211            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
34212            Self::AVSS_DRONE_POSITION(body) => body.ser(version, bytes),
34213            Self::PARAM_SET(body) => body.ser(version, bytes),
34214            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
34215            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
34216            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
34217            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
34218            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
34219            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
34220            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
34221            Self::TUNNEL(body) => body.ser(version, bytes),
34222            Self::COMMAND_LONG(body) => body.ser(version, bytes),
34223            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
34224            Self::VFR_HUD(body) => body.ser(version, bytes),
34225            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
34226            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
34227            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
34228            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
34229            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
34230            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
34231            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
34232            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
34233            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
34234            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
34235            Self::GPS_RTK(body) => body.ser(version, bytes),
34236            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
34237            Self::SIM_STATE(body) => body.ser(version, bytes),
34238            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
34239            Self::V2_EXTENSION(body) => body.ser(version, bytes),
34240            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
34241            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
34242            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
34243            Self::DEBUG_VECT(body) => body.ser(version, bytes),
34244            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
34245            Self::BATTERY_INFO(body) => body.ser(version, bytes),
34246            Self::CAN_FRAME(body) => body.ser(version, bytes),
34247            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
34248            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
34249            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
34250            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
34251            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
34252            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
34253            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
34254            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
34255            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
34256            Self::LOGGING_ACK(body) => body.ser(version, bytes),
34257            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
34258            Self::SET_MODE(body) => body.ser(version, bytes),
34259            Self::RC_CHANNELS(body) => body.ser(version, bytes),
34260            Self::ESC_INFO(body) => body.ser(version, bytes),
34261            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
34262            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
34263            Self::LOGGING_DATA(body) => body.ser(version, bytes),
34264            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
34265            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
34266            Self::AVSS_PRS_SYS_STATUS(body) => body.ser(version, bytes),
34267            Self::STATUSTEXT(body) => body.ser(version, bytes),
34268            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
34269            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
34270            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
34271            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
34272            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
34273            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
34274            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
34275            Self::GPS2_RAW(body) => body.ser(version, bytes),
34276            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
34277            Self::ESC_STATUS(body) => body.ser(version, bytes),
34278            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
34279            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
34280            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
34281            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
34282            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
34283            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
34284            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
34285            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
34286            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
34287            Self::HEARTBEAT(body) => body.ser(version, bytes),
34288            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
34289            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
34290            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
34291            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
34292            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
34293            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
34294            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
34295            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
34296            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
34297            Self::ALTITUDE(body) => body.ser(version, bytes),
34298            Self::GPS2_RTK(body) => body.ser(version, bytes),
34299            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
34300            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
34301            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
34302            Self::MISSION_ITEM(body) => body.ser(version, bytes),
34303            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
34304            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
34305            Self::LOG_ERASE(body) => body.ser(version, bytes),
34306            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
34307            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
34308            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
34309            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
34310            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
34311            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
34312            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
34313            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
34314            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
34315            Self::COMMAND_ACK(body) => body.ser(version, bytes),
34316            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
34317            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
34318            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
34319            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
34320            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
34321            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
34322            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
34323            Self::SCALED_IMU2(body) => body.ser(version, bytes),
34324            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
34325            Self::TIMESYNC(body) => body.ser(version, bytes),
34326            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
34327            Self::FENCE_STATUS(body) => body.ser(version, bytes),
34328            Self::RADIO_STATUS(body) => body.ser(version, bytes),
34329            Self::CURRENT_MODE(body) => body.ser(version, bytes),
34330            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
34331            Self::WIND_COV(body) => body.ser(version, bytes),
34332            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
34333            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
34334            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
34335            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
34336            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
34337            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
34338            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
34339            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
34340            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
34341            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
34342            Self::WINCH_STATUS(body) => body.ser(version, bytes),
34343            Self::MISSION_ACK(body) => body.ser(version, bytes),
34344            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
34345            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
34346            Self::AVSS_DRONE_OPERATION_MODE(body) => body.ser(version, bytes),
34347            Self::SCALED_IMU(body) => body.ser(version, bytes),
34348            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
34349            Self::DATA_STREAM(body) => body.ser(version, bytes),
34350            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
34351            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
34352            Self::HOME_POSITION(body) => body.ser(version, bytes),
34353            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
34354            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
34355            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
34356            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
34357            Self::DEBUG(body) => body.ser(version, bytes),
34358            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
34359            Self::COLLISION(body) => body.ser(version, bytes),
34360            Self::ODOMETRY(body) => body.ser(version, bytes),
34361            Self::LOG_DATA(body) => body.ser(version, bytes),
34362            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
34363            Self::EVENT(body) => body.ser(version, bytes),
34364            Self::PING(body) => body.ser(version, bytes),
34365            Self::RAW_IMU(body) => body.ser(version, bytes),
34366        }
34367    }
34368    fn extra_crc(id: u32) -> u8 {
34369        match id {
34370            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
34371            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
34372            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
34373            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
34374            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
34375            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
34376            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
34377            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
34378            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
34379            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
34380            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
34381            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
34382            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
34383            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
34384            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
34385            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
34386            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
34387            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
34388            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
34389            AVSS_DRONE_IMU_DATA::ID => AVSS_DRONE_IMU_DATA::EXTRA_CRC,
34390            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
34391            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
34392            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
34393            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
34394            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
34395            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
34396            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
34397            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
34398            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
34399            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
34400            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
34401            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
34402            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
34403            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
34404            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
34405            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
34406            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
34407            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
34408            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
34409            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
34410            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
34411            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
34412                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
34413            }
34414            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
34415            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
34416            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
34417            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
34418            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
34419            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34420                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
34421            }
34422            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
34423            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
34424            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
34425            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
34426            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
34427            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
34428            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
34429            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
34430            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
34431            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
34432            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
34433            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
34434            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
34435            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
34436            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
34437            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
34438            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
34439            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
34440            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
34441            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
34442            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
34443            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
34444            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
34445            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
34446            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
34447            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
34448            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
34449            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
34450            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
34451            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
34452            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
34453            AVSS_DRONE_POSITION_DATA::ID => AVSS_DRONE_POSITION_DATA::EXTRA_CRC,
34454            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
34455            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
34456            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
34457            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
34458            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
34459            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
34460            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
34461            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
34462            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
34463            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
34464            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
34465            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
34466            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
34467            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
34468            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
34469            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
34470            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
34471            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
34472            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
34473            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
34474            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
34475            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
34476            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
34477            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
34478                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
34479            }
34480            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
34481            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
34482            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
34483            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
34484            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
34485            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
34486            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
34487            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
34488            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
34489            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
34490            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
34491            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
34492            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
34493            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
34494            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
34495            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
34496            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
34497            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
34498            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
34499            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
34500            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
34501            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
34502            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
34503            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
34504            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
34505            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
34506            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
34507            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
34508            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
34509            AVSS_PRS_SYS_STATUS_DATA::ID => AVSS_PRS_SYS_STATUS_DATA::EXTRA_CRC,
34510            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
34511            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
34512            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
34513            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
34514            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
34515                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
34516            }
34517            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
34518            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
34519                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
34520            }
34521            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
34522            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
34523            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
34524            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
34525            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
34526            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
34527            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
34528            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
34529            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
34530            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
34531            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
34532            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
34533            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
34534            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
34535            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
34536            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
34537            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
34538            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
34539            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
34540                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
34541            }
34542            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
34543            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
34544            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
34545            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
34546            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
34547            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
34548            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
34549            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
34550            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
34551            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
34552            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
34553            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
34554            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
34555            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
34556            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
34557            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
34558            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
34559            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
34560                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
34561            }
34562            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
34563            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
34564            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
34565            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
34566            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
34567            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
34568            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
34569            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
34570            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
34571            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
34572            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
34573            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
34574            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
34575            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
34576            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
34577            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
34578            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
34579            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
34580            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
34581            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
34582            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
34583            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
34584            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
34585            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
34586            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
34587            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
34588            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
34589            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
34590            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
34591            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
34592            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
34593            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
34594            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
34595            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
34596            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
34597            AVSS_DRONE_OPERATION_MODE_DATA::ID => AVSS_DRONE_OPERATION_MODE_DATA::EXTRA_CRC,
34598            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
34599            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
34600            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
34601            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
34602            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
34603            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
34604            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
34605            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
34606            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
34607            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
34608            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
34609            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
34610            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
34611            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
34612            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
34613            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
34614            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
34615            PING_DATA::ID => PING_DATA::EXTRA_CRC,
34616            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
34617            _ => 0,
34618        }
34619    }
34620    fn target_system_id(&self) -> Option<u8> {
34621        match self {
34622            Self::COMMAND_INT(inner) => Some(inner.target_system),
34623            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
34624            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
34625            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
34626            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
34627            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
34628            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
34629            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
34630            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
34631            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
34632            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
34633            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
34634            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
34635            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
34636            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
34637            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
34638            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
34639            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
34640            Self::CANFD_FRAME(inner) => Some(inner.target_system),
34641            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
34642            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
34643            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
34644            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
34645            Self::PLAY_TUNE(inner) => Some(inner.target_system),
34646            Self::MISSION_COUNT(inner) => Some(inner.target_system),
34647            Self::PARAM_SET(inner) => Some(inner.target_system),
34648            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
34649            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
34650            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
34651            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
34652            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
34653            Self::TUNNEL(inner) => Some(inner.target_system),
34654            Self::COMMAND_LONG(inner) => Some(inner.target_system),
34655            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
34656            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
34657            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
34658            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
34659            Self::V2_EXTENSION(inner) => Some(inner.target_system),
34660            Self::CAN_FRAME(inner) => Some(inner.target_system),
34661            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
34662            Self::LOGGING_ACK(inner) => Some(inner.target_system),
34663            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
34664            Self::SET_MODE(inner) => Some(inner.target_system),
34665            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
34666            Self::LOGGING_DATA(inner) => Some(inner.target_system),
34667            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
34668            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
34669            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
34670            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
34671            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
34672            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
34673            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
34674            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
34675            Self::MISSION_ITEM(inner) => Some(inner.target_system),
34676            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
34677            Self::LOG_ERASE(inner) => Some(inner.target_system),
34678            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
34679            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
34680            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
34681            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
34682            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
34683            Self::COMMAND_ACK(inner) => Some(inner.target_system),
34684            Self::TIMESYNC(inner) => Some(inner.target_system),
34685            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
34686            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
34687            Self::MISSION_ACK(inner) => Some(inner.target_system),
34688            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
34689            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
34690            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
34691            Self::PING(inner) => Some(inner.target_system),
34692            _ => None,
34693        }
34694    }
34695    fn target_component_id(&self) -> Option<u8> {
34696        match self {
34697            Self::COMMAND_INT(inner) => Some(inner.target_component),
34698            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
34699            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
34700            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
34701            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
34702            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
34703            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
34704            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
34705            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
34706            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
34707            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
34708            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
34709            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
34710            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
34711            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
34712            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
34713            Self::CANFD_FRAME(inner) => Some(inner.target_component),
34714            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
34715            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
34716            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
34717            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
34718            Self::PLAY_TUNE(inner) => Some(inner.target_component),
34719            Self::MISSION_COUNT(inner) => Some(inner.target_component),
34720            Self::PARAM_SET(inner) => Some(inner.target_component),
34721            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
34722            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
34723            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
34724            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
34725            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
34726            Self::TUNNEL(inner) => Some(inner.target_component),
34727            Self::COMMAND_LONG(inner) => Some(inner.target_component),
34728            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
34729            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
34730            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
34731            Self::V2_EXTENSION(inner) => Some(inner.target_component),
34732            Self::CAN_FRAME(inner) => Some(inner.target_component),
34733            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
34734            Self::LOGGING_ACK(inner) => Some(inner.target_component),
34735            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
34736            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
34737            Self::LOGGING_DATA(inner) => Some(inner.target_component),
34738            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
34739            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
34740            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
34741            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
34742            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
34743            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
34744            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
34745            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
34746            Self::MISSION_ITEM(inner) => Some(inner.target_component),
34747            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
34748            Self::LOG_ERASE(inner) => Some(inner.target_component),
34749            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
34750            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
34751            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
34752            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
34753            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
34754            Self::COMMAND_ACK(inner) => Some(inner.target_component),
34755            Self::TIMESYNC(inner) => Some(inner.target_component),
34756            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
34757            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
34758            Self::MISSION_ACK(inner) => Some(inner.target_component),
34759            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
34760            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
34761            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
34762            Self::PING(inner) => Some(inner.target_component),
34763            _ => None,
34764        }
34765    }
34766}